Date formatting problem on some PCs

J

John

Hi

I have a Date/Time field which has values like below in UK locale;

06/10/2008 14:41:12
30/09/2008 09:40:56

A for is displaying the dates using the format string 'dd/mm/yy hh:nn' so
the dates appear on the form as below;

06/10/08 14:41
30/09/08 09:40

For some reason on some PCs these dates are appearing as;

30/12/99 00:00
30/12/99 00:00

What is the problem and how can I fix it?

Thanks

Regards
 
A

Allen Browne

30th December 1899 is day zero for dates in Access. It would therefore
appear that your dates are being treated as text values somewhere in this
process, and therefore not recognised as valid date values.

In what context are you formatting them with the string 'dd/mm/yy hh:nn'? If
this is actually in the Format property of a text box it should be fine. If
it is in the Calculated field of a query with the Format() function, that
won't work reliably: You will notice that the query output shows the column
left-aligned as text (not right-aligned as a date), and will therefore
operate on the field incorrectly. If it is in the context of a SQL statement
or criteria passed to a function or in code, it won't work correctly either,
as JET expects American format (regardless of your local settings) in these
contexts.

This might help you identify the 3 cases where Access can get your dates
wrong:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html

Post back with more detail if you are still stuck.
 
J

Jerry Whittle

Check the Regional Settings on those computers with the problem. Make sure
that they aren't set to some other country like the USA.
 

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