<xsl:if test="@discount_applies = 'Y'"> <xsl:variable name="baseDate" select="20070928" /> <xsl:variable name="itemDate" select="concat(substring(@date,7,4), substring(@date,4,2), substring(@date,1,2))" /> <xsl:choose> <xsl:when test ="$itemDate >= $baseDate"></xsl:when> <xsl:otherwise> <xsl:value-of select="discountvalue" /> <xsl:text> </xsl:text> <xsl:value-of select="@disc_value - @mk_value" /> </xsl:otherwise> </xsl:choose> </xsl:if>Just out of curiosity, when LINQ to XML is out, we will be able to handle dates more easily in .NET programs.