Date format in Access

HarrySpencer

Registered User.
Local time
Today, 12:20
Joined
Apr 10, 2007
Messages
25
Hi,

I need to export some data into XML and the data format needs to be YYYY-MM-DD, AC2000 doesn't seem to be able to do it like that closest I can find is in reverse, is it possible to format the date manually in code before exporting it if it can't be stored in that format?

Any help is greatly appreciated, Cheers Harry
 
Access picks up the date format from the pc settings, so if you change the format in Regional settings, it may work out OK. I am not going to try it though, don't want to upset the pc. Otherwise maybe set it up something like =Year(Date()) & "-" & Month(Date()) & "-" & Day(Date()) which works OK, but a single digit day/month would need more formatting.

Chris B
 
Have you tried using the format command.

set the field to =format(datefield,"yyyy-mm-yy")

Hope this helps
 
solution found

Thanks for the help just found the regional settings under windows CP works fine now.

Thanks again, Harry
 

Users who are viewing this thread

Back
Top Bottom