hours worked midnight span

Viewing 2 reply threads
  • Author
    Posts
  • October 14, 2021 at 2:13 PM #45484

    John Whittemore
    Participant

    I have a calculation using Start time, and End time with End time – Start time which worked fine until I worked from 2:00 pm one day to 12:30 am. The result for that time span is a negative number -13.5.
    Is there a way to address this with a conditional calculation?

    October 14, 2021 at 2:35 PM #45485

    Daniel Leu
    Participant

    If start_time < end_time, you know that there is an overflow. Using the IF(x;y;z) construct you can use separate formulas for both cases.

    Cheers, Daniel
    ---
    See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks

    October 15, 2021 at 1:07 AM #45486

    Brendan
    Keymaster

    If you’re using Time fields, they are all on the same day.

    You’ll want to use Date & Time if your duration might span over midnight.

Viewing 2 reply threads

You must be logged in to reply to this topic.