# dateArithmetic vs using add\<field\>

**URL:** <https://forum.inductiveautomation.com/t/datearithmetic-vs-using-add-field/84225>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [January 12, 2024, 7:54pm UTC](https://forum.inductiveautomation.com/t/datearithmetic-vs-using-add-field/84225 "2024-01-12T19:54:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [January 12, 2024, 7:54pm UTC](https://forum.inductiveautomation.com/t/datearithmetic-vs-using-add-field/84225/1 "2024-01-12T19:54:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 12, 2024, 8:48pm UTC](https://forum.inductiveautomation.com/t/datearithmetic-vs-using-add-field/84225/2 "2024-01-12T20:48:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 12, 2024, 9:20pm UTC](https://forum.inductiveautomation.com/t/datearithmetic-vs-using-add-field/84225/3 "2024-01-12T21:20:09Z")

</div>

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.
