XSL Date formatting

S

Suvig

The XML I have has the NEWS-PRESSDATE attribute. But, the date is in
number format (in milli-seconds):
  <NEWS-PRESSDATE>1080018000000</NEWS-PRESSDATE>

Q: How do I convert this to for format I want to display?
"March 23, 2004"
 
M

Martin Honnen

Suvig said:
The XML I have has the NEWS-PRESSDATE attribute. But, the date is in
number format (in milli-seconds):
<NEWS-PRESSDATE>1080018000000</NEWS-PRESSDATE>

Q: How do I convert this to for format I want to display?
"March 23, 2004"

I don't think XPath 1.0 or XSLT 1.0 has functions to convert a value in
milliseconds (since Jan 1 1970 UTC??) to a date so you would need to use
an extension function which is very processor dependant or you need to
look for a XSLT library which you can use. Maybe
http://www.exslt.org/date/index.html
has some function you can use
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top