bosari
bosari

Reputation: 2000

How to compare two dateTime in Xquery?

Lets say I have a two dates-

2017-11-17T06:04:17.138117-06:00 and 2017-11-17T06:04:47.056091-06:00

How to compare these two ?

Upvotes: 1

Views: 3128

Answers (1)

wst
wst

Reputation: 11771

Cast them as xs:dateTime and compare them using standard comparison operators:

xs:dateTime('2017-11-17T06:04:17.138117-06:00') < xs:dateTime('2017-11-17T06:04:47.056091-06:00')

Upvotes: 4

Related Questions