time/date functions in xslt or xpath

Discussion in 'XML' started by shaun, Nov 3, 2005.

  1. shaun

    shaun Guest

    I need to calculate a duration in seconds between 1 January 1970 and an
    arbitrary date (e.g today) within an xslt transform which gives the same
    answer as the time.h functions would in C. I can use xslt 2.0, however I
    cant see from the web docs how to do this.

    any guesses?

    cheers

    shaun
     
    shaun, Nov 3, 2005
    #1
    1. Advertising

  2. Read the F&O document -- a big part of it is dedicated to date-time
    processing functions.

    In particular, do have a look at op:subtract-dates()

    http://www.w3.org/TR/xpath-functions/#func-subtract-dates


    Cheers,
    Dimitre Novatchev


    "shaun" <> wrote in message
    news:...
    >I need to calculate a duration in seconds between 1 January 1970 and an
    > arbitrary date (e.g today) within an xslt transform which gives the same
    > answer as the time.h functions would in C. I can use xslt 2.0, however I
    > cant see from the web docs how to do this.
    >
    > any guesses?
    >
    > cheers
    >
    > shaun
     
    Dimitre Novatchev, Nov 3, 2005
    #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. Chris Berg
    Replies:
    0
    Views:
    806
    Chris Berg
    Oct 27, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,295
    Michael Borgwardt
    May 30, 2004
  3. Peter Gerstbach

    XSLT/xpath string functions

    Peter Gerstbach, Aug 13, 2004, in forum: XML
    Replies:
    2
    Views:
    799
    Peter Gerstbach
    Aug 14, 2004
  4. Replies:
    3
    Views:
    766
    Andy Dingley
    Dec 22, 2004
  5. Keith Cochrane
    Replies:
    2
    Views:
    630
    Keith Cochrane
    Aug 6, 2006
Loading...

Share This Page