简体   繁体   中英

XSLT / Xpath 2.0

How to display the current time stamp in the specific format For eg: 2015-07-29 13:48:18.617365 I have a requirement which I need to pass the Current time stamp in the above format if the requester is not sending it ..

So I have hard coded it for the mean time.

I would like to replace the hard coded date with current date in the above specific date. Please help me

在XSLT 2.0(不是XPath 2.0)中,您可以执行以下操作:

<xsl:value-of select="format-dateTime(current-dateTime(), '[Y0001]-[M01]-[D01] [H01]:[m01]:[s01].[f001]')" />

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