Date formats

G

Guest

How does one deal with record dates (dd/mm/yy or dd/mmm/yy with mmm in Spanish) entered on a Spanish language version of Access to a table that also accepts record date (mm/dd/yy or dd/mmm/yy with mmm in English) entries from a US version of Access in a shared database ?
 
A

Allen Browne

Internally, Access stores dates as a number where the integer part
represents the day and the fraction part represents the time. Once the date
has been interpreted correctly and stored, Access can therefore *display* it
to the user according to their locale (set through the Windows Control
Panel, under Regional Options).

When the user enters a date into the interface, Access tries to interpret it
by their Regional Options. If that doesn't make sense, it then spins the
date around and tries to find something that does make sense. However,
literal dates in VBA code and in SQL statements must be formatted as
mm/dd/yyyy.

The approach means that Access is able to display the dates to the user
according to their local settings without any effort on your part.

More information and how to avoid the three "gotchas":
International Date Formats in Access
at:
http://members.iinet.net.au/~allenbrowne/ser-36.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Bruce said:
How does one deal with record dates (dd/mm/yy or dd/mmm/yy with mmm in
Spanish) entered on a Spanish language version of Access to a table that
also accepts record date (mm/dd/yy or dd/mmm/yy with mmm in English) entries
from a US version of Access in a shared database ?
 

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