Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Marklogic 7 Issue with fn:format-dateTime

Tags:

marklogic

In MarkLogic 7.0-4, the fn:format-dateTime function seems to return incorrect values when the fractional seconds start with 0.

The below query returns different results in MarkLogic 5.0-5 and 7.0-4

let $currentUTCTime := xs:dateTime("2014-10-30T15:23:20.092563Z")

return fn:format-dateTime($currentUTCTime,"[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001]")

Correct result – 2014-10-30T15:23:20.092

MarkLogic 5.0-5 result – 2014-10-30T15:23:20.092

MarkLogic 7.0-4 result – 2014-10-30T15:23:20.930

This seems to be a bug. Does anyone has any idea about this?

like image 483
Harry Avatar asked Feb 05 '26 00:02

Harry


1 Answers

Harry, you're right, that's a bug and it's currently being fixed.

like image 197
Dave Cassel Avatar answered Feb 08 '26 23:02

Dave Cassel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!