
lea cohen
Member
Members

Forum Posts: 237
Member Since:
March 10, 2016
March 10, 2016

In the attached file, I need to check if the employee has 36 hours of rest -
Line 4 has the entry time + previous exit time - I need to check if the difference between the 2 dates
is greater than or equal to 36 hours = if so it should be written yes and vice versa no.
Thanks for the help, Leah

Riny van Eekelen
Örnsköldsvik, Sweden
Moderator
Members

Trusted Members
Moderators
Power BI

Trusted Members
Moderators
Power BI

Forum Posts: 605
Member Since:
January 31, 2022
January 31, 2022

I believe you are over-complicating the matter. The formula in I4 can be as simple as:
=IF((G4-H4)*24>=36,"Yes","No")
No need to use MOD in this type of calculation since you are comparing an ending DateTime that is always after the starting DateTime. Subtract the two and multiply by 24 to get the number of hours between them.
MOD comes into the picture when you need to be able to calculate, for instance, the number hours between to times where the starting time is before midnight and the ending time is early the next morning. A simple (End - Start) would then result in negative time ######. Then, MOD(End - Start, 1) will handle that.

Answers Post
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Shawn Ward, Shoua Lee
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
jaryszek: 183
Newest Members:
David von Kleek
Ronald White
Ginette Guevremont
Taryn Ambrosi
Mark Davenport
Christy Nichols
Harald Endres
Ashley Hughes
Herbie Key
Trevor Pindling
Forum Stats:
Groups: 3
Forums: 24
Topics: 6528
Posts: 28594
Member Stats:
Guest Posters: 49
Members: 32817
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —
