XQuery - current-time 函数



current-time 函数用于返回当前时间。

语法

current-time()

示例

XQuery 表达式

let $time := current-time()

return
<results>
   <time>{$time}</time>
</results>

输出

<results>
   <time>14:53:46.803+05:30</time>
</results>

验证结果

为了测试以上功能,将 books.xqy(在 环境设置 一章中提到)替换为上述 XQuery 表达式,并执行 XQueryTester java 程序以验证结果。

打印
xquery_date_functions.htm
广告
© . All rights reserved.