I need to convert a Java date -- expressed in milliseconds since Jan.
1, 1970 -- to a more readable format (e.g. April 18, 2005 16:53:00).
I though I could use Javascript as follows:
// JavaScript syntax
function convDate(ms) {
put(Date(ms));
}
However, typing this in the message window...
Try
function convDate(s) { //seconds since 1970, not ms!
var t = new Date();
t.setTime(s) ;
put(t);
}
Cheers,
Valentin
Tom Jacobs wrote:
I need to convert a Java date -- expressed in milliseconds since Jan.
1, 1970 -- to a more readable format (e.g. April 18, 2005 16:53:00).
I
On Apr 18, 2005, at 5:15 PM, Valentin Schmidt wrote:
function convDate(s) { //seconds since 1970, not ms!
var t = new Date();
t.setTime(s) ;
put(t);
}
Thanks Valentin. Works perfectly. I guess I know Javascript about as
well as Klingon.
Tom
[To remove yourself from this list, or to