Re: Convert time in milliseconds to a date

"A. Pagaltzis" <[email protected]>
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <20060414000524.GA19969@klangraum>
* xslt xslfo <[email protected]> [2006-04-13 17:30]:
> How can you convert time in Milliseconds to a date format?
> 
> For example: I have input 1143232487392
> The desired Output is Mar 24 2006

First divide by 1000 so you get a number in seconds, then convert
this to a duration, then add this duration to Jan 1, 1970.
Something like

    date:add( '1970-01-01', date:duration( floor( $msec / 1000 ) ) )

Untested.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.