2025 Mar 03 11:11 AM - edited 2025 Mar 03 1:44 PM
Hi Team,
We are using custom statement in our project and we need inputs on what syntax can be used for Date Difference formula in XSL statement.
Please provide your inputs on the same.
Regards,
Satish Naik
Request clarification before answering.
Hello @satnaik18 ,
This might work!
<xsl:template match="/dates"> <xsl:variable name="date1" select="xs:date(date1)" /> <xsl:variable name="date2" select="xs:date(date2)" /> <!-- Calculate the difference in days --> <xsl:variable name="date-diff" select="xs:date($date2) - xs:date($date1)" /> <!-- Output the difference --> <difference> <xsl:value-of select="$date-diff" /> </difference> </xsl:template>
Try adding code in a notepad++ to view in actual format and understand the code. You can probably use chatgpt as well. Try doing a preview in some testing sites like https://www.w3schools.com/xml/xml_xslt.asp
Good Luck!
Regards,
Surya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.