Convert an int to a datetime in SQL Server2008
Posted on 2011-05-05
I've a table in a sqlserver 2008 database, one of the columns in the table is an int which stores values as 60110 which I'm trying to convert to an datetime of 2010-06-10 00:00:00.000
or 120211 which I'm trying to convert to an datetime of 2011-02-12 00:00:00.000
SELECT column1, convert(datetime,CONVERT(int,column1))
but for 60105 the above converts it to 2064-07-24 00:00:00.000 rather than
Any help would be much appreciated.