I have a date/time field from a shopping cart API feed, but I don't know what format it is in and I don't have access to the database.
What could [1252457867] be for a date? These dates are all within the last couple weeks
Any ideas?
I have a date/time field from a shopping cart API feed, but I don't know what format it is in and I don't have access to the database.
What could [1252457867] be for a date? These dates are all within the last couple weeks
Any ideas?
That looks like seconds elapsed since Jan. 1st, 1970 12:00AM.
Use this function to get the date:
var baseDate = new DateTime(1970, 1, 1, 0, 0, 0);
var transactionDate = baseDate.AddSeconds(1252457867);
This will output {9/9/2009 12:57:47 AM} PST
**EDIT: ** If you need UTC:
var utcDate = baseDate.AddSeconds(1252457867).ToUniversalTime();
This outputs {9/9/2009 7:57:47 AM}
--Adam