日期到日期时间的 XQuery 转换
我有一个变量参数,其格式为 XML 中的 date 类型。我需要将该参数转换为 dateTime 格式,以便另一个变量接受我的复制操作。这是在 BPEL 中完成的,但无论处理语言如何,XQuery 的表达式构建器都应该相同。非常感谢您的帮助。
I have a variable parameter that is formatted to the date type in XML. I need to convert that parameter into the dateTime format for another variable to accept my copy operation. This is being done in BPEL, but the expression builder for XQuery should be the same regardless of the processing language. Thanks very much for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当 $date 保存 xs:date 值时,然后
将完成这项工作。请参阅 转换 部分www.w3.org/TR/xquery/" rel="noreferrer">XQuery 建议 了解详细信息
或者,您可以将 xs:date 值传递到 XQuery 建议。 org/TR/xquery-operators/#constructor-functions" rel="noreferrer">xs:dateTime 构造函数:
还有一个特殊的构造函数 fn:dateTime 控制时间部分:
When $date holds the xs:date value, then
will do the job. See the section on casting in the XQuery recommendation for details
Alternatively, you could pass the xs:date value into the xs:dateTime constructor function:
Also there is a special constructor function fn:dateTime that gives control of the time part: