Xpath Date Comparison Using Textbox
my xml file :-
Solution 1:
The following query should work:
let$ref-date := xs:date("1989-03-10")
let$data := <root>
<name id="1">
<region value="001">
<date value="1989-03-09"/>
</region>
</name>
<name id="2">
<region value="002">
<date value="1989-03-11"/>
</region>
</name>
</root>
return$data/name[region/date/xs:date(@value) lt $ref-date]
You can try it live at http://www.zorba-xquery.com/html/demo#r0KwHwjp1weVwefDUn1Z6roVD3A=
Post a Comment for "Xpath Date Comparison Using Textbox"