I am struggeling to add 2 hours to a time stamp. It is not a possibility to upgrade to XSLT version 2.0 unformatunately.
08:40:20
Desired output:
10:40:20
I am struggeling to add 2 hours to a time stamp. It is not a possibility to upgrade to XSLT version 2.0 unformatunately.
08:40:20
Desired output:
10:40:20
Well, you could do simply:
<xsl:template match="Time">
<DesiredTime>
<xsl:value-of select="substring-before(., ':') + 2" />
<xsl:text>:</xsl:text>
<xsl:value-of select="substring-after(., ':')" />
</DesiredTime>
</xsl:template>
If you want it to roll back to 0 after midnight, then do:
<xsl:value-of select="(substring-before(., ':') + 2) mod 24" />
and if you want a leading zero then wrap it in format-number()
.