Page 1 of 1

Usage of current-dateTime () function in an XSLT doc transfo

Posted: Wed Jul 30, 2014 4:45 pm
by JamesWebster
All,

I apologize for this obviously silly question but here goes...How does one call and display the current date and time in an XSLT transformation document? It is not existing in the XML document and I cannot find any XSLT samples where it is used online anywhere. Any namespace requirement(s) and samples would be wonderful.

Thank you in Advance!

James

Re: Usage of current-dateTime () function in an XSLT doc tra

Posted: Wed Jul 30, 2014 5:05 pm
by adrian
Hi,

You can simply evaluate it with xsl:value-of.

Code: Select all

<xsl:value-of select="current-dateTime()"/>
Note that this is an XPath 2.0 function, so it only works in XSLT 2.0 and later.

Regards,
Adrian