Reputation: 35
i have to dates: xs:date(current-date())
and something like this 2017-11-01T09:17:00Z
.
I need to get difference in minutes.
My idea is with minutes-from-duration()
function, but i don't know how convert the dates to right input
Upvotes: 1
Views: 906
Reputation: 167781
You can simply substract two dates or dateTimes in XSLT/XPath 2 or later with e.g. current-dateTime() - xs:dateTime('2017-11-01T09:17:00Z')
to get a duration, then you can use your function or other operations like e.g. (current-dateTime() - xs:dateTime('2017-11-01T09:17:00Z')) div xs:dayTimeDuration('PT1M')
which would divide the duration by 1min.
Upvotes: 1