[AccessD] SQL 2005 - disambiguous DateTime format

Jim Lawrence accessd at shaw.ca
Sat Aug 16 10:49:09 CDT 2008


Hi Borge:

Having done contracts for both the federal and provincial governments for
years there are only two acceptable date display methods. There has been
just too much confusion in the past.

1. yyyy mm dd 	ie. 20080821 or 2008/08/21	(SI standard)
2. dd Mmm yyyy	ie. 21 Aug 2008

Both above methods will never cause errors like methods of 5/8/2008 will.

Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Borge Hansen
Sent: Saturday, August 16, 2008 1:06 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] SQL 2005 - disambiguous DateTime format

Hi all,

I SQL 2005 I have adopted to routine of always passing a DateTime format for
whatever purpose in the format of a string:

YYYY-MM-DD

in order to be sure that the date is interpreted correctly irrespective of
locale setting of the computer


Now some colleagues are telling me to use format DD-MMM-YYYY is the -only-
safe way.

I would think that both methods of passing a date would be -safe-

(To avoid misinterpretation of 4/8/2008 - is it 4 August 2008 or 8 April
2008?)

Any pointers to KB article or other than explains this in more detail?

Regards
Borge
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list