Handling date formats

L

Luke Bellamy

Hi - as you would know the Austalian date format is dd/mm/yyyy and the
US date format is mm/dd/yyyy. So to get around this problem I handle my
dates in the format dd-mmm-yyyy (i.e 1-MAR-2006). This works fine.
BUT there are some countries that have wierd and wonderful formats such
as dd.mm.yyyy and Access does not like it when you try and write or cdate
1-MAR-2006 to a date type field when the locale is set to a country with one
of these different formats.

Is there a better international date standard I should have been using? Is
there a better way
to handle international dates?
What I am doing is adding 3 months to the sys date and resetting the day of
month
to be the 1st for a scheduled task.

Thanks
 
D

Douglas J. Steele

I'm unaware of problems with CDate using 1-Mar-2006, regardless of what the
short date format's been set to in Regional Settings (assuming, of course,
that their language is set to English)

To get the first of the month 3 months from now, use DateSerial(Year(Date),
Month(Date) + 3, 1)
 
A

Allen Browne

Hi Luke

Regardless of how your format your dates for display, internally Access
stores the date as a number where the integer part represents the date and
the fraction part the time (e.g. 0.5 = noon, 0.25 = 6am.)

After 13 years working with Austrlian dates in Access, this article might
help:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top