How to convert a "dd/mm/yyyy" string to datetime in MSSQL ?
- by Sim
I tried this
SELECT convert(datetime, '23/07/2009', 111)
but got this error
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
However
SELECT convert(datetime, '07/23/2009', 111)
is OK though
How to fix the 1st one ?
Thanks