I have a following date scenario, in which i want to increment in date, But the date format is of as following: 2015-05-03T00:00:00Z. I only want to increment in date of one day. So that if it reaches 31 then the month should be updated. I saw an existing question but the solution is not working on my scenario.
XML:
<?xml version="1.0" encoding="UTF-8"?>
<rootElement>
<TestDate>2015-05-03T00:00:00Z</TestDate>
</rootElement>
XSLT:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="rootElement">
<TransformDate>
<xsl:value-of select="substring(TestDate,1,10)" />
</TransformDate>
</xsl:template>
</xsl:transform>
Result:
<?xml version="1.0" encoding="UTF-8"?>
<TransformDate>2015-05-03</TransformDate>
ExpectedResult:
<?xml version="1.0" encoding="UTF-8"?>
<TransformDate>2015-05-04T00:00:00Z</TransformDate>