Thursday, 27 September 2012

Compare DateTime in XSLT

<xsl:template name="Webinar" match="Row[@Style='Webinar']" mode="itemstyle">
      
        
         <xsl:variable name="ACEndDate">
             <xsl:value-of select="ddwrt:FormatDateTime(@ToDate, 2057, 'yyyyMMddhhmmss')"/>
         </xsl:variable>
  
             <xsl:variable name="CurrentDate">
      <xsl:value-of select="ddwrt:FormatDateTime(string(ddwrt:Today()), 2057, 'yyyyMMddhhmmss')"/>
       </xsl:variable>     
          
    <xsl:if test="$CurrentDate &lt; $ACEndDate">
      
/////// do here for your data

    </xsl:if>         
    
 </xsl:template>

No comments:

Post a Comment