kanni
kanni

Reputation: 73

Date comparison between specific date formats in xquery

I have two dates; date1 = 2021-01-14T00:00:00-05:00 and date2 = 2021-01-17T00:00:00-05:00. is there a good way to compare them in xquery

Upvotes: 0

Views: 99

Answers (1)

Michael Kay
Michael Kay

Reputation: 163322

Yes, you can simply do

 xs:dateTime('2021-01-14T00:00:00-05:00') 
 < xs:dateTime('2021-01-17T00:00:00-05:00')

Upvotes: 1

Related Questions