Re: Convert time in milliseconds to a date
"xslt xslfo" <[email protected]>
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
Hi: Thanks for your response. I am using xslt 1.0. I have tried using exslt functions with no success. Is there any other way? On 4/13/06, A. Pagaltzis <[email protected]> wrote: > * 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/> > _______________________________________________ > exslt mailing list > [email protected] > http://www.exslt.org/list >