xsl-list
[Top] [All Lists]

Re: Date Difference

2005-12-19 14:01:36
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(_dot_)weinmann(_at_)as        To:       
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com                                
             
                      sentis.com>                cc:                            
                                                       
                                                 Subject:  Re: [xsl] 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



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

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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>