Jump to content

time subtraction in xslt 1.0


sbutt

Recommended Posts

Hi All, I want to subtract '2 hours' from a given time in xslt 1. E.g.

<xsl:variable name="time">		 <xsl:choose>	   <xsl:when test="ns0:DepartureTime !=''">		<xsl:value-of select="ns0:DepartureTime"/>	   </xsl:when>		  <xsl:otherwise>		   <xsl:value-of select="'00:00:00'"/>		   </xsl:otherwise>		 </xsl:choose>		</xsl:variable>

I want from this $time variable now subtract 2 hours and set it's value to an attribute.

<xsl:value-of select="$time"></xsl:value-of>

Could some please help?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...