In xquery, How to get 90 days before date from a given date?
Say given date is 30-03-2012. I want to get the date which is 90 days before the given date. Leap year calculation should also not get missed.
I could not find any built in functions. There are add/substract methods, but it works only with two dates.
Any ideas?
You need to subtract a dayTimeDuration (90 days) from a date, i.e.
xs:date("2012-03-30") - xs:dayTimeDuration("P90D")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With