I have the below condition set within my xsl code:
<xsl:if test="ddwrt:FormatDateTime(string(@ExpiryDate), 1033, 'yyyyMMdd') >= ddwrt:FormatDateTime(string(ddwrt:Today()), 1033, 'yyyyMMdd')">DO SOMETHING</xsl:if>
The @ExpiryDate is a SharePoint column, this is why I am formatting the dates (expiry date and today date) to the same structure and language before comparison.
Strangely, when todays date is 26/08/2016 and the expiry date is 01/09/2016 the statement is not executed, however if todays date is 26/08/2016 and the expiry date is 09/09/2016 the statement is executed? I'm presuming the format isn't quite right somehow but I am finding it hard to test/debug.
Any help appreciated.