Skip to main content
Question

Subtract business hours from timestamp

  • July 24, 2020
  • 0 replies
  • 97 views

Forum|alt.badge.img+1
I have a time stamp field called "Deadline" and I want to subtract business hours from it (weekday hours.) How?

ToWeekdayP([Deadline]-Hours(#))
This doesn't work, it just knocks the result to a Friday if it falls on Sat/Sun.
Subtracting 36 business hours from an 8am Monday deadline should return Thursday at 8pm, not Friday at 8pm.

------------------------------
Thanks,
Jen Hamilton
------------------------------
This topic has been closed for replies.

I had to do something similar (calculate using working hours and not just regular hours).  The way I did this was by creating a very complex set of variables and if statements that increased the hours to subtract depending on how to take into account the non-working hours.   In my case this was in a single day so I only had to take into account an 8 hour work day.  But you could do something similar using "DayofWeek" for your problem.   It's brute force, but it works.

------------------------------
Andrew Patricio
------------------------------