Counting Date & Time

Hi:

I’m struggling to count date & time in Notes. I can count days, times and exclude the business days. but when everything comes together, it can’t work. On top of that, the counting should be based on 8-hour per day.

Exp: hours = endDate - startDate

If 1:

startDate = 23rd Nov 1500 and

endDate = 24th Nov 1000

it should return 3 hours (2 working hours on 23rd and 1 working hour on 24th)

If 2:

startDate = 23rd Nov 1000 and

endDate = 27th Nov 1500

I can get 3 days which is correct but what I want the result is 21 hours

I store the date & time together in endDate and startDate. Shall I split it? I treid but still it doesn’t work. I include @businessDay in my formula coz I want to exclude sat & sun.

Pls help.

Many thanks.

Subject: Counting Date & Time

I think this will work:

  1. Get all business days (you already got that one so I won’t go into that) in hours. Result: 3 days * 8 = 24

  2. Substract 8 hours for the first and 8 hours for the last day from the total. Result: 24 - 8 - 8 = 8

  3. Add the working hours from the first day to the total.(I assume a business day is 0900 - 1700). Result: 8 + (1700-1000) = 8 + 7 = 15

  4. Add the working hours from the last day to the total. Result: 15 + (1500-0900) = 15 + 6 = 21

Endresult: 21 hours.

Subject: RE: Counting Date & Time

Yes, Renee, the logic work. In fact, this is what I was using when I go step by step.

When go a bit in dept, system should automate the calculation by having a complete formula.

Actually it needed to be counted on a lot of fields. Thus, no way I think I should go by splitting it one-by-one.

Do you think you have a complete formula to include everything?