0

I need to increase a date field by 1 day. The xslt I have which displays this date is:

<xsl:value-of select="ddwrt:FormatDateTime(string(pubDate),1041,'yyyy年 MM月 dd日')"/>

I tried to add one day with:

<xsl:value-of select="ddwrt:FormatDateTime(string(pubDate),1041,'yyyy年 MM月 dd日')+1"/>

but then the dates change to NaN. Is there a way to accomplish this with XSLT?

Thank you!

0

Try below line:

<xsl:value-of select="ddwrt:FormatDateTime(string(pubDate),1041,'yyyy年 MM月 dd日') + xs:dayTimeDuration('P1D')"/>

Refer this link which might be helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.