[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Date Difference

Subject: Re: Date Difference
From: thomas.maciejewski@xxxxxxxxx
Date: Mon, 19 Dec 2005 16:01:36 -0500
calculate date difference
I could do this but thought that there might be an easier way i was looking
at something like :

                  <xsl:variable name="date-diff2"
select="op:subtract-dateTimes-yielding-dayTimeDuration
(xs:dateTime(saxon:evaluate($idxSettleDate))
,xs:dateTime(xs:date(sgfr:StringToDateFormat($todays-date)   ) ) )"/>

but cant get it to work.

Do you think I should go down the julian route or is there a better way?

Regards,

I

Tom Maciejewski



                                                                                                                                       
                      Rudolf P. Weinmann                                                                                               
                      <rudolf.weinmann@as        To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx                                             
                      sentis.com>                cc:                                                                                   
                                                 Subject:  Re:  Date Difference                                                   
                      12/19/2005 03:11 PM                                                                                              
                      Please respond to                                                                                                
                      xsl-list                                                                                                         
                                                                                                                                       
                                                                                                                                       




>Is there an easy way to do a date difference in XSLT.
>
>I basically have two strings :   "9/11/2004"  and "10/25/2005"
>and would like to produce the number of days between the two.
>

Maybe you could use
http://xsltsl.sourceforge.net/date-time.html#template.dt:calculate-julian-day

It takes the three parameters day, month and year and returns the Julian
Day as a decimal number which you could use to calculate
the difference between to dates.

Rudolf



*************************************************************************
This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration.   
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates 
shall be liable for the message if altered, changed or falsified. 

*************************************************************************

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.