xml - XSL Add year to current date -


i want add year current date in xsl 2.0 know how current date:

<applin_dt><xsl:value-fof select="format-date(current-date(), '[y0001]-[m01]-[d01]')"/></applin_dt> 

the current date must formatted 'yyyy-mm-dd' in other element need currentdate + 1 year. best solution this?

thanks!

robert

as using xslt 2.0, try this...

<applin_dt>    <xsl:value-of select="format-date(current-date() + xs:yearmonthduration('p1y'), '[y0001]-[m01]-[d01]')"/> </applin_dt> 

where namespace xs prefix http://www.w3.org/2001/xmlschema


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -