[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Date compare in XSL
2009/11/19 Anil Kumar Veeramalli <anil.v@xxxxxxxxxxxxxxxxxxxxx>: > Hi , > > I have two variables. I want to find out which is greatest date. I am using > XSL1.0 > > <xsl:variable name="date1" select="01-Jan-2008"></xsl:variable> > <xsl:variable name="date2" select="02-Jan-2009"></xsl:variable> > > I could not find any function or documentation to compare the dates. > > Please suggest me on this. In XSLT 1.0, the usual way is to string process the dates into the form YYYYMMDD, then you can just do straight number comparisons, for example 20080101 is before 20090102. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|