i have scenario in need increment 1 day in existing date. in <subscriptiondate>2015-05-06</subscriptiondate>
want increase 1 day , map value <terminationdate>2015-05-07</terminationdate>
. how can achieve using xslt. so, date constraints should handled. if day 31 increment in month.
<subscription code="12345678r1"> <useraccount>40000005b</useraccount> <offertemplate>test</offertemplate> <subscriptiondate>2015-05-06</subscriptiondate> <terminationdate></terminationdate> </subscription>
assuming xslt 2.0 can add duration date e.g.
<xsl:template match="terminationdate"> <xsl:copy> <xsl:value-of select="xs:date(preceding-sibling::subscriptiondate) + xs:daytimeduration('p1d')"/> </xsl:copy> </xsl:template>
Comments
Post a Comment