sql:timestampdiff( $dateTimeType as xs:ID, $timestamp1 as xs:genericDateTimeArg, $timestamp2 as xs:genericDateTimeArg ) as xs:integer?
Returns the difference in dateTimeType field of two given timestamps.
xdmp:sql("select timestampdiff(SQL_TSI_DAY,'2009-05-20T03:03:03','2009-05-18T03:03:03')","format") => |ANON7761991471377004207| |2|
sql:timestampdiff('SQL_TSI_DAY', '2009-05-20T03:03:03','2009-05-18T03:03:03') => |ANON7761991471377004207| |2|
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.