convert american dates from a query
Not really -- that is what is displayed. What is actually returned is the
date serial
? clng(cdate("1 Dec 2005"))
38687
Excel is just extremely helpful in recognizing that this is a date and
displaying it as such in your regional settings
The date serial can be displayed anyway you want and the Months and Days
will be correct.
The date serial is non ambiguous.
--
Regards,
Tom Ogilvy
"Roger Govier" wrote in message
...
Hi Tom
On a UK machine the following is returned
? cdate("1 Dec 2005")
01/12/2005
? datevalue("1 Dec 2005")
01/12/2005
Regards
Roger Govier
Tom Ogilvy wrote:
VBA should understand that date format:
? cdate("1 Dec 2005")
12/01/2005
? datevalue("1 Dec 2005")
12/01/2005
I don't have a non US machine to test it on, but I think converting the
string in VBA to a dateserial should do what you need.
|