Pages

Wednesday, January 25, 2017

Case duration of ageing

Case duration of ageing


The formula will show how long case is still not completed status:

IF(
    NOT(ISPICKVAL( Status , "Completed")),
    IF(FLOOR( (NOW()- CreatedDate)) > 0,TEXT( FLOOR( (NOW()- CreatedDate)) ) & " days ", "") 
    & IF(FLOOR( MOD( (NOW()- CreatedDate)* 24, 24 ) )>0,TEXT( FLOOR( MOD( (NOW()- CreatedDate)* 24, 24 ) ) ) & " hours ","") 
    & TEXT( ROUND( MOD( (NOW()- CreatedDate)* 24 * 60, 60 ), 0 ) ) & " minutes "
    & TEXT( ROUND( MOD( (NOW()- CreatedDate)* 24 * 60*60, 60 ), 0 ) ) & " seconds", 
    ""
)

It will display the value like this:
19 days 13 hours 7 minutes 53 seconds

No comments:

Post a Comment