I have XML attributes, <EventDate>2011-06-16 08:00:00</EventDate> and I want to extract 08:00:00 using XSLT.
I saw what was fn:hours-from-dateTime(datetime) thanks to w3schools . So I wonder why not fn:time-from-dateTime(datetime) ?
And how to use it? My current code is:
<td><xsl:value-of select="@EventDate"/></td>
How to correctly display the date. But:
<td><xsl:value-of select="hours-from-dateTime(@EventDate)"/></td>
Does not work.
Finally, is there something more elegant than doing:
<td><xsl:value-of select="hours-from-dateTime(@EventDate)"/>: <xsl:value-of select="minutes-from-dateTime(@EventDate)"/>: <xsl:value-of select="seconds-from-dateTime(@EventDate)"/></td>
?
source share