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

Re: Date Difference

Subject: Re: [xsl] Date Difference
From: thomas.maciejewski@xxxxxxxxx
Date: Mon, 19 Dec 2005 15:59:15 -0500
date difference
Ummm ... well I think it is obvious that I am not in Europe and that I am
not asking why I am getting a NaN ...
If you REALLY need me to make this clear.   I am trying to get the
differences between two dates.    If you dont know the American style of
dates 10/25/04 = 25/10/04
I can get from one to the other ... that is not an issue.   I want to find
out if there is a difference between the two.

Currently I am looking at:


                  <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 this doesn't seem to work.



Tom Maciejewski



                                                                                                                                     
                      Chris Burdess                                                                                                  
                      <d09@xxxxxxx>            To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx                                             
                                               cc:                                                                                   
                      12/19/2005 02:49         Subject:  Re: [xsl] Date Difference                                                   
                      PM                                                                                                             
                      Please respond to                                                                                              
                      xsl-list                                                                                                       
                                                                                                                                     
                                                                                                                                     




thomas.maciejewski@xxxxxxxxx wrote:
> 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.

In Europe, the number of days between the two is NaN, because
10/25/2005 is not a valid date.

HTH
--
犬 Chris Burdess
   "They that can give up essential liberty to obtain a little safety
   deserve neither liberty nor safety." - Benjamin Franklin



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