[英]XSLT 2.0 Time Display
I'm having trouble in getting my desired output. 我无法获得所需的输出。 I already search alot from internet but still no luck that's why I'm posting this simple problem(maybe to most of expert) 我已经从互联网上搜索了很多,但是仍然没有运气,这就是为什么我发布了这个简单的问题(也许对大多数专家而言)
This code will generate the current time date with utc format 此代码将以utc格式生成当前时间日期
<xsl:variable name="utc"
select="
adjust-dateTime-to-timezone(
current-dateTime(),
xs:dayTimeDuration('PT0H'))
"/>
Output eg. 输出例如 2015-11-08T12:13:18.634Z
I just want to display the year and time without the after seconds datas ".634Z" Desired output: 我只想显示年份和时间,而不需要秒后数据“ .634Z”的期望输出:
2015-11-08T12:13:18
Thanks. 谢谢。
使用例如format-dateTime(current-dateTime(), '[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01]')
,请参阅文档http://www.w3。 org / TR / xslt20 /#date-time-examples 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.