sql-serverdatetimetypes

12 digits format - is this a datetime or?


I am working on a SQL server database and I have two columns in a table with values like these below. I've tried converting to datetime, date, epoch, excel format, nothing seems to work, I can't find exactly what it is. Maybe I am wrong and is not datetime? What could it be?

428964571475
426594519082    
426594519086    
426594519091    
426594519095    
426594519097    
428964564747    
426594519102

Solution

  • Use datetime:

    declare @x bigint = 428964571475 
    select cast ( @x * 0.0000001 as datetime )