# Using datediff in a expression tag

**URL:** <https://forum.inductiveautomation.com/t/using-datediff-in-a-expression-tag/35042>\
**Category:** General Discussion\
**Tags:** ignition79\
**Created:** [May 26, 2020, 2:18pm UTC](https://forum.inductiveautomation.com/t/using-datediff-in-a-expression-tag/35042 "2020-05-26T14:18:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![victor.meza](https://avatars.discourse-cdn.com/v4/letter/v/f08c70/32.png) [@victor.meza](https://forum.inductiveautomation.com/u/victor.meza)\
**Post date:** [May 26, 2020, 2:18pm UTC](https://forum.inductiveautomation.com/t/using-datediff-in-a-expression-tag/35042/1 "2020-05-26T14:18:51Z")

</div>

Hello, I’m trying to get the difference between 2 dates using datediff() function in an expression tag but the result is not like it supposed to be. Attached the picture. I get the result but also with characters “yyyy-mm-dd” that I don’t need.

Is there a way to just get the number??

![datediff](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b6acfc34e8a2259eca6b4b0a3a67c9ecf5194d05.jpeg)

---

<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:** [May 26, 2020, 4:55pm UTC](https://forum.inductiveautomation.com/t/using-datediff-in-a-expression-tag/35042/2 "2020-05-26T16:55:39Z")

</div>

Clear the number format on the tag - I’m guessing you originally had `Fecha_Diff` created as a Date datatype.
