What is the difference between using dateArithmetic vs addDays, addHours, addWeeks, etc...
Is there a benefit or reason to use one over the other?
Thanks
What is the difference between using dateArithmetic vs addDays, addHours, addWeeks, etc...
Is there a benefit or reason to use one over the other?
Thanks
You've tagged the question as "scripting" but these are all Expression Language functions.
It's a good question though. I don't see any difference other than the add* functions are shorter and more intuitive.
Performance will be essentially identical. dateArithmetic
would allow you to do dynamic math - e.g. use a reference to a dropdown list for the unit, as well as a reference for the amount.
For a fixed calculation, I'd use the add*
functions.