Probably this has been replied before in many topics, but I didn't really find a post informing people of this strange thing that MS access does.
on MSDN I can read that MS access will use the system date used on the host system. in my case that is dd/mm/yyyy.
However, just to be on the safe side, I explicitly tell access that my dates are formatted as follow:
that will do most of the time. Access sees your dates, nods and accepts them without much ado. He's in an irritating way very pigheaded however, by changing for example 15/04/2010 into 04/15/2010 when you do a testquery.
you sigh, and you wonder why they insist, but you accept, it does what it has to do. you work work work, and then suddenly you notice that at one point that you've got all the assignments in 6 months and not those in one week.
many things can have gone wrong, arrays are not emptied, the recordset is still full, the weeknr to date does miscalculations and then you finally find it.
access doesn't see any reason to change 02/08/2010 - 08/08/2010 to 08/02/2010 - 08/08/2010 and instead gives you all the stuff between the eight of februari and the eight of august, no matter that in all the 30 other cases it's the other way around.
so, my advice is for all those poor Europeans using access, just go with mm/dd/yyyy. I won't start an argument on which date format is the most logical, though I will say that it is mighty confusing when access assures me it uses the system date while in fact it does only when it sees that there is no other logical way (i.e. 24/02/2010 cannot possible be MM/DD/YYYY)
on MSDN I can read that MS access will use the system date used on the host system. in my case that is dd/mm/yyyy.
However, just to be on the safe side, I explicitly tell access that my dates are formatted as follow:
Code:
Format(startDate, "DD/MM/YYYY")
//
Format(endDatum, "DD/MM/YYYY")
you sigh, and you wonder why they insist, but you accept, it does what it has to do. you work work work, and then suddenly you notice that at one point that you've got all the assignments in 6 months and not those in one week.
many things can have gone wrong, arrays are not emptied, the recordset is still full, the weeknr to date does miscalculations and then you finally find it.
access doesn't see any reason to change 02/08/2010 - 08/08/2010 to 08/02/2010 - 08/08/2010 and instead gives you all the stuff between the eight of februari and the eight of august, no matter that in all the 30 other cases it's the other way around.
so, my advice is for all those poor Europeans using access, just go with mm/dd/yyyy. I won't start an argument on which date format is the most logical, though I will say that it is mighty confusing when access assures me it uses the system date while in fact it does only when it sees that there is no other logical way (i.e. 24/02/2010 cannot possible be MM/DD/YYYY)