1 2 CONVERT(DATETIME, 'yyyymmdd', 112)
112 -> ISO date
cf. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ca-co_2f3o.asp
----------
Edit: a better solution !
1 2 {d 'yyyy-mm-dd'}
Thanks to Wild Richard (http://www.bigbold.com/snippets/posts/show/756)
dates
{d 'yyyy-mm-dd'}
times
{t 'hh:mm:ss'}
timestamps
{ts 'yyyy-mm-dd hh:mm:ss'}
See MS reference
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetdate_time_and_timestamp_literals.asp
It is a pity that there isn't some sort of SQL standard for date representation. Or maybe there is and I don't know it?