
For SQL Server, the safe format is YYYYMMDD. All other formats are subject
to different interpretation depending on language, dateformat, and regional
settings.
For any SQL-compliant database, I'm afraid you will have to research each
database platform independently. I am sure each platform has its own set of
rules on how to interpret dates that are passed as string literals in
various formats.
???
Ok, so it sounds like the server where you are running this (or at least the
session where the statement is running) has non-standard language,
dateformat, or regional settings. I cannot reproduce this on my
workstation, but of course I am running US English and I haven't altered my
dateformat or regional settings. In this situation you would have no
problem using YYYY-MM-DD, but if you are using some other settings then all
bets are off. Can't really suggest what to change in order to make the
above statement work, without having a better idea of how your server is set
up. I do know that if you change the string literal to '20090325' then it
will work no matter how you have configured any of these settings.
A