Trouble with time

Thank you for the reply and excellent explanations as always @Victor !

The issue is the tester is 1 day ahead in reality often - but the recorded entry would be 2 days ahead, even when the displayed tmpCurrentDate was correct.

Second: in order to add / subtract days you should use +1 / -1. Dates&times are stored as number of days since 1/1/1970. You may get correct result when subtracting 0.5 but this may happen only to date/datetime rounding flow.

The problem is that adding or subtracting 1 to change the date for me never seemed to work - I would always get the wrong day back.

Regarding storing the date as a number:
A question - if I store the date as a number, how do I convert it back to date to display, or to use in calculations for logic?
EDIT: I see some good guidance here: How to calculate with days and minutes - #6 by Yongki

I will try converting to DateTime format and see if that works – that adds an issue, though because of the conditional visibilty for the “add record” button. I did have that display (like your tutorial) only if count of daily records, with the filter

  1. Current Daily Record → Logged in user is equal to Record ID of user
    and
  2. Date is equal to Logged in user → tmpCurrentDate
    were both equal to zero.

How can I check condition 2 (date is equal to User tmpCurrentDate) with DateTime format vs Date? I only get options for is after, is before or is between.

My thought now is that I keep the current tmpCurrentDate and fill that with the new tmpCurrentDateTime variable so that tmpCurrentDate keeps the current day and I can still use that in logic.

Thanks again, I’ll update here if changing to DateTime format works.