Click to See Complete Forum and Search --> : XML Xpath question
yags5
06-30-2003, 09:56 AM
Can anyone tell me how it would be possible to compare dates using variables with attribute values in a XML node. This is what I have, but it doesn't work.
strXpath = "//time_block[@end_dttm >'" & dtEstStartDtTm & "' and @start_dttm <'" & dtEstEndDtTm & "']"
Thanks,
Rod Yager
Khalid Ali
06-30-2003, 11:40 AM
If I remember correctly,XSL does not have any thing like date object,therefore you will need to write a template that will compare values as strings...
Charles
06-30-2003, 11:54 AM
If you use the W3CDTF (http://www.w3.org/TR/NOTE-datetime) then it's quite simple to work with dates as simple strings. Otherwise, you can always use EXSLT Dates and Times module (http://www.exslt.org/).
yags5
06-30-2003, 01:01 PM
Thanks all. It sounds comparing with simple date strings is the way to go here. It would really be nice though if there was a simple date function. :)