Expand my Community achievements bar.

Aging of a Task

Avatar

Employee
Hello, I am trying to show aging for of a task from planned start date to today. I thought it would be simple to add the column and update in text mode, but this one isn’t working for me. DATEDIFF({$$TODAY},{plannedStartDate}) Any ideas? Thank you
Topics

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

6 Replies

Avatar

Level 10
{{Laurel}} I have tickets open with WorkFront tech support on the DATEDIFF function. I couldn’t get it to work, either, and neither could the first-level support people. It was escalated and I await the results of their analysis. It had to do with DATEDIFF’s problem with attributes that had hours associated with it and attributes that didn’t. In the end, even when it subtracted two dates with no hours on the dates, we got fractions. We should get integers. Um, I don’t trust the DATEDIFF function. That’s my opinion. Eric

Avatar

Level 10
Hi Laurel, As below, I sifted through my personal archives and think I found what you're looking for, in order to calculate more granular DATEDIFFs. Regards, Doug
On Sun, Dec 15, 2013 at 9:08 PM, Doug Den Hoed < wrote: For short Tasks, I realized last week that the built in DATEDIFF function is not granular enough to calculate the Actual Duration, since it rounds to the nearest day. However, you can use the following three formulas below on respective Calculated Numeric Parameters to calculate the Actual Duration of Tasks in Minutes, Hours, and Days. Tasks that have not yet started will show Null, and Tasks that have not yet completed will have an extra .5 minute, .05 hour, or .005 day, respectively, visually indicating that "it's still going". ACTUAL DURATION IN MINUTES IF(ISBLANK(Actual Completion Date) ,IF(ISBLANK(Actual Start Date) ,null ,ROUND((NUMBER($$NOW)-NUMBER(Actual Start Date))/(1000*60),0)+.5 ) ,ROUND((NUMBER(Actual Completion Date)-NUMBER(Actual Start Date))/(1000*60),0) ) ACTUAL DURATION IN HOURS IF(ISBLANK(Actual Completion Date) ,IF(ISBLANK(Actual Start Date) ,null ,ROUND((NUMBER($$NOW)-NUMBER(Actual Start Date))/(1000*60*60),1)+.05 ) ,ROUND((NUMBER(Actual Completion Date)-NUMBER(Actual Start Date))/(1000*60*60),1) ) ACTUAL DURATION IN DAYS IF(ISBLANK(Actual Completion Date) ,IF(ISBLANK(Actual Start Date) ,null ,ROUND((NUMBER($$NOW)-NUMBER(Actual Start Date))/(1000*60*60*24),2)+.005 ) ,ROUND((NUMBER(Actual Completion Date)-NUMBER(Actual Start Date))/(1000*60*60*24),2) )

Avatar

Employee
Thank you Eric - Good to know and may explain my issue.

Avatar

Employee
Thanks Doug - looks like I might need to try a different solution then what I had orinally planned on doing.

Avatar

Level 8
Dear Laurel, Doug's formula is certainly robust for all cases. But if you have filters that exclude the outlying cases he's catering for, I think the problem with your base formula is the braces (curly brackets) around $$TODAY. They should only go around fields in the database. So the following should work as a basic: DATEDIFF($$TODAY,{plannedStartDate})

Avatar

Employee
Thank you!! I removed the {} and it worked!! I knew it was user error :-)