Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
<xsl:value-of select="date:add('2010-10-01', 'P1M')"/><br/><xsl:value-of select="date:add('2010-07-01', 'P1M')"/><br/><xsl:value-of select="date:add('2010-02-01', 'P1M')"/><br/><xsl:value-of select="date:add('2010-09-01', 'P1M')"/>
...gives:
2010-10-31T00:00:00
2010-07-31T00:00:00
2010-03-03T00:00:00
2010-10-01T00:00:00
This is not useful. Is there actually a way of adding a month short of splitting the date myself? Or am I missing something obvious?
Hmm, should have done a bit more digging, but ah well, may this post will help someone else :o)
If you use the Umbraco library function it works fine:
<xsl:value-of select="umbraco.library:DateAdd('2010-10-01', 'm', 1)"/>
2010-11-01T00:00:00
(and the other moths including Feb work the same)
Great stuff - this just helped me a lot. Thanks.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Exslt date:add($date, 'P1M') just adds 30 days
...gives:
2010-10-31T00:00:00
2010-07-31T00:00:00
2010-03-03T00:00:00
2010-10-01T00:00:00
This is not useful. Is there actually a way of adding a month short of splitting the date myself? Or am I missing something obvious?
Hmm, should have done a bit more digging, but ah well, may this post will help someone else :o)
If you use the Umbraco library function it works fine:
...gives:
2010-11-01T00:00:00
(and the other moths including Feb work the same)
Great stuff - this just helped me a lot. Thanks.
is working on a reply...