
Untitled
By: a guest on
May 28th, 2012 | syntax:
None | size: 0.70 KB | hits: 16 | expires: Never
format and display datetime in xslt
<A>
<StartDate>2011-11-01T00:00:00</StartDate>
<EndDate>2011-11-30T00:00:00</EndDate>
<IsRecurring>false</IsRecurring>
</A>
01/11/2011 - 30/11/2011
<xsl:value-of select="A/StartDate/> - <xsl:value-of select="A/EndDate/>
2011-11-01T00:00:00 - 2011-11-30T00:00:00
<xsl:variable name="dt" select="'2011-11-01T12:13:59'"/>
<xsl:value-of select="concat(
substring($dt, 9, 2),
'/',
substring($dt, 6, 2),
'/',
substring($dt, 1, 4)
)"/>
substring(replace($input, "(d{4})-(d{2})-(d{2})", "$3/$2/$1"), 0, 11)