Gustav Brock
gustav at cactus.dk
Thu Aug 21 09:12:41 CDT 2014
Hi Jack Yes, I have seen that page. I think it somewhat scares the user, though the rules are quite simple. Focus should be on how to do it right rather than what can goes wrong (because it, of course, most likely will fail if you don't follow the rules). /gustav -----Oprindelig meddelelse----- Fra: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] På vegne af jack drawbridge Sendt: 21. august 2014 15:52 Til: Access Developers discussion and problem solving Emne: Re: [AccessD] Most common problems/situations Gustav, Thanks for the clarification. I was passing on some experiences/comments from a user/developer and this article by Allen Browne. <http://allenbrowne.com/ser-36.html> jack On Thu, Aug 21, 2014 at 9:23 AM, Gustav Brock <gustav at cactus.dk> wrote: > 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? "