XML Development

Moderators: None (Apply to moderate this forum)
Number of threads: 252
Number of posts: 451

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
date addition in xslt Posted by sundaresan1981 on 21 Jan 2011 at 5:26 AM
Hi

I have a date retrieved in xslt in this format "01/18/2011". I just want to know how to add 10 days to it.

the below code gives the current date,month and year.

<xsl:variable name="rightNow" select="cal:getInstance()" />
<xsl:variable name="month" select="cal:get($rightNow, 2) + 1" />
<xsl:variable name="day" select="cal:get($rightNow, 5) " />
<xsl:variable name="year" select="cal:get($rightNow, 1)" />

I have the date like this

<xsl:variable name="sampledate">01/18/2011</xsl:variable>

Plese let me know how to set this value of "sampledate" in calendar:getInstance and then add 10 days to it.

Thanks










 

Recent Jobs