Is there any way in XQuery to get the current time in milliseconds since some Epoch?

(current-dateTime() - xs:dateTime("1970-01-01T00:00:00-00:00")) div xs:dayTimeDuration('PT0.001S')

returns the number of seconds as a duration, and then divides by 1 millisecond to get the number of milliseconds as a number.


thank you for the tips. I modify the code for Oracle Service Bus 11g (OSB 11g) Xpath editor in case someone else needs it

{ (fn:current-dateTime() - xs:dateTime("1970-01-01T00:00:00-00:00")) div xdt:dayTimeDuration("PT0.001S") }

Tags:

Xpath

Xquery