Formula for duration field, based on date/time fie...
# ask-stanley-ai
l
Formula for duration field, based on date/time fields: start date and end date (difference in time), for decimal fields shown as hours. Round to 2 decimal places
c
AI generated answer (using internal Slack threads):
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** To calculate the difference between two date/time fields in hours, you can use a formula in a saved search. The formula would subtract the start date/time from the end date/time. However, the result of this calculation will be in days, so you will need to multiply the result by 24 to convert it to hours. Here is an example of how you can do this: *Formula(Numeric): ROUND(({End Date Field ID} - {Start Date Field ID}) * 24, 2)* This formula calculates the difference between the two date fields, converts the result to hours, and then rounds the result to 2 decimal places. Please replace {End Date Field ID} and {Start Date Field ID} with the actual field IDs of your date/time fields. If you want to calculate the difference only during specific working hours, you might need to modify the formula to suit your specific business hours requirement. Unfortunately, this can be quite complex and might not be possible with a simple formula. You might need to use a script to achieve this.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.843078673
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84198004
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835571468
Please provide your feedback on this answer.