Hi,
I have a flat file that has dates in the following format:
2010-05-12 12:32:11, for example
However I am seeing the following inconsistencies when I try to convert this format to a datetime:
Thanks
I have a flat file that has dates in the following format:
2010-05-12 12:32:11, for example
However I am seeing the following inconsistencies when I try to convert this format to a datetime:
select [date] from myTable -- 2010-05-12 12:32:11
This works:
select convert(datetime, '2010-05-12 12:32:11')
-- 2010-05-12 12:32:11.000
This doesn't work, why?:
select convert(datetime, [date]) from myTable
Msg 241, Level 16, State 1, Line 1
Conversion failed when converting datetime from character string.
Thanks