Jump to content
Sign in to follow this  
sbutt

time subtraction in xslt 1.0

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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...