xsl-list
[Top] [All Lists]

RE: Date Difference

2005-12-19 12:07:56
XSLT 2.0 allows you to do a date difference: but first you need to convert
the dates into ISO format - which is easy enough using the XPath 2.0
tokenize() function.

If you can't use XSLT 2.0 you could look to see if there's anything at
www.exslt.org

Michael Kay
http://www.saxonica.com 



-----Original Message-----
From: thomas(_dot_)maciejewski(_at_)sgcib(_dot_)com 
[mailto:thomas(_dot_)maciejewski(_at_)sgcib(_dot_)com] 
Sent: 19 December 2005 17:54
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Date Difference

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.

If that is too difficult it would be OK for me to know if one 
is equal to
the other ... or maybe if one is equal to, less than or 
greater than the
other.

Regards,


Tom Maciejewski

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





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