I'm using this dataset which has a 'Week' property. I can see its type is Edm.DateTime
, but unfortunately I don't know this type.
How can I convert it convert to a timestamp or date?
Example:
/Date(-94176000000)/
/Date(1478304000000)/
I'm using this dataset which has a 'Week' property. I can see its type is Edm.DateTime
, but unfortunately I don't know this type.
How can I convert it convert to a timestamp or date?
Example:
/Date(-94176000000)/
/Date(1478304000000)/
These are the number of milliseconds after (or before, for negative values) January 1st, 1970, midnight UTC, which is the Unix epoch.
You can use a website like this one; it shows the current time in seconds since the epoch, but it converts milliseconds as well.
Your first example, -94176000000
, converts to Saturday, January 7, 1967 0:00:00
; it's quite rare to see negative Unix timestamps but in case of historical data, it happens. If I browse the data here, it also starts in January 1967.
How to convert these depends on the programming language. In Java, the default constructor for Date accepts exactly this format; C# has e.g. a DateTimeOffset.FromUnixTimeMilliseconds
method.