Date calculation

I calculate the number of days between today and another date.

TODAY: Dec 10
Date: Dec 7

I did (formula): INT(TODAY) - INT(Database.Date)

I expect to get 3 days but adalo give me 2 days.

I just cannot figure out why I get this and how to solve this issue. I know it’s relate to the hours but I cannot figure out out to solve my issue.
I tried to display the internal number store and I got 2 days… but why??

Thanks to help me with that.

Have you tried other date combinations?

If the margin of error you get is always 1, then the simplest thing to do is to update your formula to add 1, and problem solved. :slightly_smiling_face:

Yes, I tried other date combinaison. Sometime, it miss 1 day and sometime it’s ok.

I solve the issue by adding a Date Field in my database to store the Date part without de Time. When I do the calculation with the Date instead of the DateTime, then the result is always OK.

But this is really strange… I will do another post about that.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.