I am not sure if it is something with xslt or xpath..but how do I increment a date by 1 day? For example, if the date is 2/16/2009 I want the date to become 2/17/2009.
Hi Ash, It is recommended that you delete this answer and put further updates into your question by selecting "edit" underneath your question text. Good luck with Stack Overflow.
Alex B
2009-05-22 16:42:15
I do not see a delete option..i am sorry..
2009-05-22 16:58:36
+1
A:
http://www.dpawson.co.uk/xsl/rev2/dates.html contains the snippet
<xsl:function name="dp:date-add">
<xsl:param name="date" as="xs:dateTime"/>
<xsl:param name="days" as="xs:integer"/>
<xsl:variable name="day" select="$date + ($one-day * $days)"/>
<xsl:value-of select="format-dateTime($day,'[Y,*-2]-[M,2]-[D,2]')"/>
</xsl:function>
I have not tested this, but it claims to add the values of "days" to "date". I recall doing something similar, but my XSLT code was replaced long ago with template pages.
Godeke
2009-05-22 17:29:13