I don't think i and j really have to be formatted for this, but, if you insist:
DatePart('d',i) & "/" & DatePart('m',i) & "/" & DatePart('yyyy',i)
likewise with j
And as a note, + can be used to concatenate strings, it's just by convention that most peole use &, which makes it less ambiguous.
+ will still work, and I know some people (well - only one to be honest) who always use + instead of &.
Oh yeah - and I'm assuming that i and j are already dates, not strings. which is why formatting wouldn't be necessary - unless of course i and j were dates with times, and you wanted to roll them both back to midnight.
If i and j are strings, with a format like "mm/dd/yyyy", then you'd have to use left, mid, right and len functions, like:
Mid(Field,4,2)& "/" & Left(Field,2) & "/" & Right(Field,4)
You'd run into a problem if the string didn't necessarily have all the digits filled, for example, 1/1/2001
in which case you'd have to use the InStr function to find the "/" and select the part of the string based on its location
I'm assuming this reply answers most scenarios.
Steven
There are 10 kinds of people in the world - those who understand binary - and those with friends
|