Hi, my first date date1 and second date date2
data1: <xsl:value-of select="//n1:Invoice/cac:PaymentMeans/cbc:PaymentDueDate" disable-output-escaping="yes" />
date2: <xsl:value-of select="//n1:Invoice/cbc:IssueDate" disable-output-escaping="yes" />
i want date2-date1= ... day
How will this be spelled? Thank you..
Originally Posted by Martin Honnen
Assuming XSLT 2 or 3 you can construct two xs: date instances and substract them to get a duration, note however that the format to construct and xs: date is YYYY-MM-DD so you need to extract the components from your format first.
xs:date('2017-01-20') - xs:date('2017-01-02')
gives a xs:dayTimeDuration P18D