Convert a formatted date string to a date value in XPath

 ̄綄美尐妖づ 提交于 2020-01-15 03:13:48

问题


How can I convert a date contained in a string into a date value with XPath?

I got the string by formatting a date value with fn:format-date, and now I want the date value from the formatted string.

Thank you,


回答1:


You can use EXSLT's date:date(string). It is implemented in most XSLT processors but also as a pure XSLT function.

Documentation: http://www.exslt.org/date/functions/date/index.html.



来源:https://stackoverflow.com/questions/9208959/convert-a-formatted-date-string-to-a-date-value-in-xpath

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!