1b.app
Link copied -

incorrectly calculates date difference

Here is an example process
https://panel.darium.com.ua/admin/customorder/protsenti/243353/edit/
Here is the setting (at the stage)
Checks 2 dates
https://prnt.sc/1vzm1dj
last_month_date: 2021-12-31
Period by: 2022-03-31
Difference between them = 90 days (and the system counts 89)
The problem is observed only in months where there is February, in all others it works correctly
Original question is available on version: ru

Answers:


Gubko Alexander Sergeevich
SheBo
Client wrote:
Here is the setting (at the stage)

Good afternoon, what exactly is the action that calculates the date difference?
13.10.2021, 17:26
Original comment available on version: ru

Right here
https://panel.darium.com.ua/admin/shop/workflowstatus/244/action/new/
Calculate the difference between the dates of the process, taking into account the coefficient and write in the additional field of the process
13.10.2021, 17:28
Original comment available on version: ru

The result of calculating these dates is approximately 89.958, the system rounds to the smallest integer.
On the Internet, other services probably round up to the nearest integer.
13.10.2021, 18:04
Original comment available on version: ru

why is that ?
like whole days then 90 (which pass)
it is clear that there is a hitch for a minute, but in fact 29 days pass, in the example of a specific project (deposits) 1 day is very critical and important
how can i fix it?
13.10.2021, 18:07
Original comment available on version: ru

tick in action round to integer - does not help
How can you make it count correctly?
Write the received value in add. floating-point field and rounded by another action to the nearest value ?
14.10.2021, 14:02
Original comment available on version: ru

As it turned out, the problem is in the translation of time by an hour in autumn and spring, which is not taken into account.
While the decision is under discussion.
14.10.2021, 14:53
Original comment available on version: ru

Tell me, did you come to a decision?
17.10.2021, 12:12
Original comment available on version: ru

Hello, tell me, is there any solution?
19.10.2021, 09:18
Original comment available on version: ru


Gubko Alexander Sergeevich
SheBo wrote:
Period by:2022-03-31
Difference between them = 90 days (and the system counts 89)

no it's not right
full day has not passed
you count the date before the specified one and a full day will pass if the field would contain the date 2022-03-31 23:59:59
21.10.2021, 10:03
Original comment available on version: ru

I found a solution, I just count the difference in hours (not days), it tells me the exact number of hours, and then I divide by 24 rounded to 0. Now it works as it should
21.10.2021, 13:00
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license

Gubko Alexander Sergeevich
SheBo wrote:
I found a solution, I just count the difference in hours (not days), it tells me the exact number of hours, and then I divide by 24 rounded to 0. Now it works as it should

Oh, the same crap, you need to count not even a full day, but the action does not count :(
21.10.2021, 16:16
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment