XSL Date formatting

Discussion in 'XML' started by Suvig, Apr 1, 2004.

  1. Suvig

    Suvig Guest

    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"
    Suvig, Apr 1, 2004
    #1
    1. Advertising

  2. Suvig wrote:

    > 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
    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Apr 2, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    1
    Views:
    589
    Matthew Speed
    Nov 8, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,229
    Michael Borgwardt
    May 30, 2004
  3. Replies:
    1
    Views:
    3,591
    A. Bolmarcich
    May 27, 2005
  4. Matt
    Replies:
    2
    Views:
    505
    Pete Becker
    Nov 8, 2003
  5. Matt
    Replies:
    3
    Views:
    709
    Richard Heathfield
    Nov 8, 2003
Loading...

Share This Page