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)
)