I have a column abc varchar(100) with data like 2011-09-26 16:36:57.810000
abc varchar(100)
2011-09-26 16:36:57.810000
I want to convert this column to DATETIME...
DATETIME
Based on GBrian's answer, I came up with:
CONVERT(DATETIME, CONVERT(DATETIME2, abc, 126))
I haven't benchmarked how this stacks up against the substring-based solutions.