I am trying to create an equation field to capture the amount of time from when a record is created and when a status field is changed to “Scheduled”. I have a “date/time created” field and a “appointment date/time” field. Both fields settings are set to display date and time.
I need to calculate the number of work hours between these two fields. Work hours are considered as 8am to 6pm daily, Monday to Friday.
Thank you for reaching out to us! This can be done by using two Date Equations:
Calculating the number of hours (date created + appointment date)
Calculating the number of days and multiplying it by 14 (these are non-business hours)
Then subtract the result of #1 - #2
Equation 1 will count every hour, not just 8am to 6pm, so equation 2 will count the number of non-business hours and multiplying them by the number of days so that you can then take those non-business hours from the equation 1
This doesn’t look like it works. The first step doesn’t generate the correct result. I have an equation field with the equation type set to date and in the equation editor I have: {Date Created}+{Appointment Date}
The amount of time is way off. For example, I have a record with a date created of 05/22/2023 3:32pm and an appointment date of 05/23/2023 1:00am and the result of the equation is 935,992.53.
Looks like the issue is persistent when you try adding the equation field that has the total to a form. If you add it to a details view it is correct. Also, if you have a large dataset, the equation takes a short time to update all the records.
Thanks Nick, but I don’t understand point 2. What am I using to calculate the days? Am I using the same fields but just changing the output to days instead of hours? More detail would be helpful. Thanks in advance!
This may require taking a look at your apps and setups, and we would love to further help you with finding a solution for this. Please submit these details to the support team either via the chat widget in the Builder of your app or via this Form. Thank you for your patience!