![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - date comparison >Thread Next - Re: date comparison Re: date comparisonTo: NULL Date: 7/8/2007 1:38:00 PM viklall@g... wrote: > How do you do a date comparison in xslt? XSLT 1.0 does not know about dates. XSLT 2.0 has support for the XML schema xs:date data type so there you can do e.g. <xsl:value-of select="xs:date('2007-01-01') > xs:date('2007-07-08')"/> With XSLT 1.0 your only chance is to convert the dates to numbers and compare those e.g. <xsl:value-of select="number(translate('2007-01-01', '-', '')) > number(translate('2007-07-08', '-', ''))"/> -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
