全部, 我想在Xquery,OSB 12C中进行日期减法操作。基本上,必须检查输入日期是否为<系统日期起6个月。
即如何在xquery中执行:(SystemDate - inputDate)< 6个月
经历过: https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqdtopref.html但无法编译其中列出的任何函数。还在xquery中添加了命名空间。我需要添加任何库吗?
非常感谢任何指针。
答案 0 :(得分:0)
OSB有一些日期扩展,您可以read about here。
但是,您可能甚至不需要simple stuff like you mentioned。
答案 1 :(得分:0)
全部,
问题得到解决。请找到逻辑链接:http://developer.marklogic.com/pipermail/general/2015-February/016462.html
答案 2 :(得分:0)
减去日期会在XQuery中为你提供dayTimeDuration。
以下代码是一种检查时间间隔的简单而准确的方法。
days-from-duration(fn:current-date() - $inputDate) < 180
180是您需要验证的天数。