Loading TOC...

xdmp:timestamp-to-wallclock

xdmp:timestamp-to-wallclock(
   $timestamp as xs:unsignedLong
) as xs:dateTime

Summary

Converts a 64 bit timestamp value to an xs:dateTime.

Parameters
$timestamp The timestamp.

Example

xdmp:timestamp-to-wallclock(9476208600000000)
=> 2000-01-11T12:01:00
 

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • NB although the timestamp is always an offset to UTC, the resulting xs:dateTime does not have the UTC timezone offset set (Z): be sure to set it before using the value in any calculations, or converting to another timezone, otherwise you may get unexpected results. e.g. <pre> fn:adjust-dateTime-to-timezone( xdmp:timestamp-to-wallclock(9476208600000000), xs:dayTimeDuration('PT0H') ) => 2000-01-11T12:01:00Z </pre>