Hi,
How to calculate Working days & time below between two dates in days & total time.
04-11-2024 12:27:44 14-11-2024 14:44:05
9:30am to 7pm - Working hours
7:00pm to 9:30am - Non Working hours
Sunday - No days
in attached sample you can use "Created On" & "Closed date time"
@shahnawaz_khan
You can use this formula
DateTimeDiff(dt1,dt2,u)
U can be days, hours, minutes etc.
Do not forget to transform the data to be a datetime format, as this will not work with strig
From date you can get the days, and then deduct the weekends.
Hey @shahnawaz_khan
Working hours are a bit tricky. My approach is to generate every minute between the start and end times, and then filter out the non-working ones.
You can then count the minutes, and divide by 60 to find the hours. This obviously explodes your data. You could generate the hours, but I wanted the fidelity of data to account for start and end times not lining up perfectly with the working hour boundaries.
Hope that helps,
Ollie