Expand my Community achievements bar.

Calculating DATEDIFF in HOURS

Avatar

Level 4
This must be extremely simple, but I cannot get my expression to work. I have created a calculated expression. I am open to covering this to text mode in reporting, but I just want to get it to work. In Workfront, I have been trying to convert DATEDIFF into total hours. Now, my date fields are custom date fields, they are tied to issues, but my business sponsor wants to see values for these dates in the follow formats: Difference in total hours between date 1 and date 2. Different in total business hours between date 1 and date 2. Any advice on how to convert my formula from a simple DATEDIFF(Date2, Date1) to display the total hours between these date fields? Jaclyn Reiter, PMP, SA Project Manager, Strategic Initiatives Equifax, Inc. St. Louis, MO 314-684-2693
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

5 Replies

Avatar

Level 10
Would it be easier to change over and start using WORKMINUTESDIFF instead? As in WORKMINUTESDIFF (Date 2, Date 1)/60 -skye

Avatar

Level 4
That's were I was heading too. I can get this to work. My only area of concern is that this returns the number of scheduled minutes between the dates according to the default schedule, and the teams tracking issues here have schedules that are all over the place. Some work between the hours of 2am and 12am while others are more 8 to 5, but the point is that the business hours for these teams just aren't consistent. So, my sponsor is asking for 24 hours. Do you think I should manipulate the default schedule and change it from 8am to 5pm to 24 hours? I don't think it would be a problem because we really aren't using the default schedule for anything. Jaclyn Reiter, PMP, SA Project Manager, Strategic Initiatives Equifax, Inc. St. Louis, MO 314-684-2693

Avatar

Level 10
well, I see why you're not using workminutesdiff, if everyone is on a different workday. I can't speak to changing your default schedule (probably you should try that out in the sandbox). Maybe can you show your other datediff equation to see what's going on? A weekdaydiff(date2,date1)*24 worked in my report in a calculated column--is this what you're trying on your side? -skye

Avatar

Level 4
Thank you, Skye. You gave me an idea that solved my problem. I just did DATEDIFF(date2, date1)*24 and that is working correctly. Super simple, but I just couldn't get myself all the way to the solution. I really appreciate your help. If it weren't for you, I wouldn't have figured it out. Thanks, maybe I'll see you at LEAP. Jaclyn Jaclyn Reiter, PMP, SA Project Manager, Strategic Initiatives Equifax, Inc. St. Louis, MO 314-684-2693

Avatar

Level 10
I will definitely be there! So glad your problem was resolved. :) -skye