The JavaScript library I'm using represents user login times as long integers:
1325982833403
How do I convert this to a DateTime ('MM/dd/yyyy hh:mm tt') value that the datejs library would understand?
The JavaScript library I'm using represents user login times as long integers:
1325982833403
How do I convert this to a DateTime ('MM/dd/yyyy hh:mm tt') value that the datejs library would understand?
It's a UNIX timestamp; an extremely useful representation of a moment in time.
Unix time, or POSIX time, is a system for describing instants in time, defined as
the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of
Thursday, January 1, 1970 ...
(http://en.wikipedia.org/wiki/Unix_time)
In practice, with this particular library (http://www.datejs.com/), use:
<script src="http://datejs.googlecode.com/files/date.js" type="text/javascript"></script>
<script type="text/javacript">
var mydate = Date(1325982833403);
</script>
Using Date constructor:
That number is Unix timestamp, google for more information about this, and conversion techniques