View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default convert american dates from a query

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.

--
Regards,
Tom Ogilvy

"Mika" wrote in message
ups.com...
Hi,

I checked past post about date conversions but couldn't find any that
fix my problem:

- I am doing a query that returns dates (text strings) in the format 1
Dec 2005, and I need to convert them to the user short date format.

Problem is that the xl of those users does not understand "Dec". As
there are "built in" functions that only works in the American format I
was expecting this was going to be an easy one... but so far no
success. Ideas

Mika