Reputation: 13
I have an XML that has a date format of 20230101 and I need to add 60 days to this date when mapping it over. this is a random date so it always changes and we are using XSLT2. I can not figure out how to do this in XSLT, does anyone know a way to do this in Mapforce.
Upvotes: 0
Views: 119
Reputation: 1
You can use the build in function datetime-add
of altovas basic libary
Add your date (convert to Date-Time before) as first parameter
Add P60D as second parameter
If needed remove time (convert back to just date)
Upvotes: 0
Reputation: 167401
Use e.g. xs:date(replace('20230101', '([0-9]{4})([0-9]{2})([0-9]{2})', '$1-$2-$3')) + xs:dayTimeDuration('P60D')
.
Upvotes: 1