[AccessD] Most common problems/situations

Gustav Brock gustav at cactus.dk
Thu Aug 21 08:23:20 CDT 2014


Hi Jack

There is no "sometimes". In the GUI, the date format is always localized except if you specify another format in the Format property.
In VBA and SQL, date string expressions are always read in US, then local, then ISO format until a match. 
For CDate and DateValue, however, the sequence is local, US, ISO.
For ADO and FindFirst, only the ISO format is reliable.

/gustav

-----Oprindelig meddelelse-----
Fra: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] På vegne af jack drawbridge
Sendt: 21. august 2014 14:30
Til: Access Developers discussion and problem solving
Emne: Re: [AccessD] Most common problems/situations

Arthur,

Thought I'd pass this on since it came by today and seems to fit your request.

" In the user interface - forms, query criteria, - where users enter dates, MS assumes the format is the system setting, even if the date is enclosed in # tags, as it might be in query criteria. I have always been led to believe that any date between # marks had to be MDY (regardless of system setting), but no. Only sometimes.

You'd think MS could enable users to set the date format that Access uses everywhere, including SQL and VBA, regardless of the system date format setting.

I wonder how many non-USA users have been caught by this, without realizing it? "



More information about the AccessD mailing list