convert date as integer

Status
Not open for further replies.

office politics

It's all just 1s and 0s
Messages
6,555
Location
in the lab
we have a database that logs application access. the log timestamps are coded as integers

1293858000000 - Jan 1 2011

1293944400000 - jan 2 2011

1294117199000 - jan 3 2011

1294117200000 - jan 4 2011

1294289999000 - jan 5 2011


i'd thin they'd be regular intervals but the subtraction produces the following differences

-86400000

-172799000

-1000

-172799000



any ideas on how to convert a known date to the correct integer?
 
Those integers will be unix timestamps. The DBMS or programming language you are using will have conversion functions.

EDIT: Those timestamps have three trailing zeros each which they should not have. Also the conversions you have posted next to them aren't all correct.
 
My initial thought was that there would be a Julian date in some truncated form of your integers... but definitely not, unless the time is set wrong on your sever. The Julian date would have to start with a 9, so there'd be a preceding 12 on all of those, which IDK why it would have.
Today's date/time when I'm posting this in Julian is 986910.88125 (9:08 am on January 6).
 
Those integers will be unix timestamps. The DBMS or programming language you are using will have conversion functions.

EDIT: Those timestamps have three trailing zeros each which they should not have. Also the conversions you have posted next to them aren't all correct.


i used the following page to convert the numbers excluding the last three zeros. the numbers do seem to be unix timestamps. They are set to the date listed with a time of 5:00 UTC (give or take one sec). I'll use this information to generate new queries. Adding Rep for kmote. Thanks.

Online Conversion - Unix time conversion
 
Status
Not open for further replies.
Back
Top Bottom