# Calculating days between 2 dates

**URL:** <https://community.triggre.com/t/calculating-days-between-2-dates/512>\
**Category:** Support\
**Tags:** dates, calculations\
**Created:** [September 19, 2023, 12:58pm UTC](https://community.triggre.com/t/calculating-days-between-2-dates/512 "2023-09-19T12:58:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rick](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@rick](https://community.triggre.com/u/rick)\
**Post date:** [September 19, 2023, 12:58pm UTC](https://community.triggre.com/t/calculating-days-between-2-dates/512/1 "2023-09-19T12:58:55Z")

</div>

I always assumed that Triggre would give a whole number when you calculate something like (end date - start date)/ 1 days. But it turns out that in some cases it gives me a number like this 61,04567. Why is this? And what could I do to calculate the whole number of days?

---

<div class="post-metadata">

**Author:** ![Eddie](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.triggre.com/eddie/32/89_2.png) [@Eddie](https://community.triggre.com/u/Eddie)\
**Post date:** [September 19, 2023, 1:08pm UTC](https://community.triggre.com/t/calculating-days-between-2-dates/512/2 "2023-09-19T13:08:11Z")

</div>

It depends:  
Triggre always calculates with 6 decimals.  
If you save it into your datamodel it removes decimals based on how the propety has been configured in your datamodel.

Also, if one of the two dates is acutally a DateTime it’s highly expected that you don’t get a whole number.

If your result doesn’t meet any of these two situations described above, please send me a DM with the link to your design in the designer and show me an example of two dates that you subtract and the result of it.

---

<div class="post-metadata">

**Author:** ![Eddie](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.triggre.com/eddie/32/89_2.png) [@Eddie](https://community.triggre.com/u/Eddie)\
**Post date:** [September 25, 2023, 9:36am UTC](https://community.triggre.com/t/calculating-days-between-2-dates/512/3 "2023-09-25T09:36:30Z")

</div>

Hi Rick,  
It appears this calculation doesn’t return a whole day, when one of the two dates crosses day light saving time.

So if you would substract 01-jun-2023 from 01-sep-2023 it’ll all be fine and Triggre will return a whole number.  
However, when you would subtract 01-jun-2023 from 01-nov-2023 Triggre will return a number with decimals, since winter time started on october 29.

I’ve created a defect for our development team to fix this.
