HI all, I got a JavaScript function to convert the date, but I was wondering if there is any way to convert the date with xsl without using JavaScript.
Thanks.
HI all, I got a JavaScript function to convert the date, but I was wondering if there is any way to convert the date with xsl without using JavaScript.
Thanks.
the format-date function might do the job, have a look at it here:
and the string manipulation, http://www.xml.com/pub/a/2002/05/01/xslt-string.html
You can use the Microsoft formatter: http://msdn.microsoft.com/en-us/library/ms256099.aspx
or if you are using XSLT 2.0 (which .Net does not) http://www.w3.org/TR/xslt20/#function-format-date
Hi guys, Thanks to all of you for answering my question, after looking on those links you left me to take a look I came out with something very simple.
<xsl:for-each select="//MaternityDiaryEvent/DateOfVisit">
<xsl:value-of select="concat(substring(.,9,2),'/',substring(.,6,2),'/',substring(.,3,2))"/>
</xsl:for-each>
Thanks again to all, I'll give you a vote to each of you.
Cesar.