简体   繁体   中英

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

    <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:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM