I have a problem that occurred on one of my applications to track my working hours. Until now, I had no problems, so I don’t understand what’s going on. I’ll try to explain it to you simply:
If the selected date is Friday, then the “day” value is equal to 15300000 (milliseconds).
I have a procedure that calculates my hours, if there are overtime hours or less hours. But see with this screenshot, I don’t understand how the “overtime” variable can change from a positive value to a negative value, while I have nowhere else blocks that modify it.
Thank you for your answer. The “do it” is only done once, nothing changes, and I do not manipulate the app during the “do it”.
The “day” value is “15300000”, it is the value in miliseconds of the duration worked on Friday. This “day” variable never changes. It’s my “overtime” variable that’s giving me trouble.
This may occur with finding day i think… so that it turns like this. Do one thing. Use label for every logic and try to print the values for each day, you can find where does the error appear
@plumedours
From where are you getting the global total_day variable value?
Is it getting changed/used anywhere else outside the set_overtime procedure
I come back to you regarding my problem, I solved it. I actually had a conflict between the day text and the month text, because in French, the month of March and the day of Tuesday both start with “mar”, so when I entered the hours for the Friday (which in French how by “ven”) there was a conflict because it also took into account the first 3 letters of March which are the same as Tuesday (in French).