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

ios - Is 'init' forbidden as *part* of a variable name? -

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -

qt - Microsoft FTP Service 451 The parameter is incorrect -