Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Convert Bigint time to datetime RE: Convert Bigint time to datetime
Lynn Pettis
SSC Guru
Points: 442467
More actions
April 17, 2014 at 11:09 am
#1706873
PSB (4/17/2014)SELECT DATEADD(hh,-5,dateadd(s, convert(bigint, 1397750400000) / 1000, convert(datetime, '1-1-1970 00:00:00')))worked for me!
PSB (4/17/2014)
worked for me!
So the BIGINT value was actually milliseconds since midnight 1970-01-01, not minutes. Good to know.