- Code: Select all
<xsl:template match="TextElement[@Name='Runtime']">
<xsl:variable name="hours" select="floor($Runtime div 60)"/>
<xsl:variable name="minutes" select="$Runtime mod 60"/>
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
<xsl:choose>
<xsl:when test="$Runtime != '' ">
<xsl:attribute name="Text"><xsl:value-of select="concat($hours,'h','',$minutes)"/></xsl:attribute>
</xsl:when>
</xsl:choose>
</xsl:copy>
</xsl:template>
I saw this:

Can someone told me what I have to change for having a zero before the minutes if it's under 10.
So I would like to have 2H00 to 2H09.
Thanks.





