Post

2 followers Follow
0
Avatar

Duration Workflow for Resolved Cases

Morning all,

I've created a custom field called Duration for Cases.  I'd like to populate this field with the number of days it has taken to resolve a case from the date & time it was created.

I've searched for the solution in the community and the only solution I've found is this:

Days(((DateSubtract(Today(),$CreatedOn,TRUE)) / Hours(1))/7.5).

I also need the duration to not include weekends and, if possible, days that the company isn't working.

The above script works but isnt reporting the correct duration.

Any advice would be much appreciated.

Cheers

Martin Jubb Answered

Please sign in to leave a comment.

3 comments

0
Avatar

Hello Martin,

My suggestion is to try this: DateSubtract(Now(), $CreatedOn,TRUE)

I hope this helps.

Roland

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Hi Roland,

I went with this and it appears to be working fine:

Days(((DateSubtract($ResolvedDate,$CreatedOn,TRUE)) / Days(1)))

Can you see any issues with using this?

Cheers 

Martin Jubb 0 votes
Comment actions Permalink
0
Avatar

Hi Martin, 

Days(((DateSubtract($ResolvedDate,$CreatedOn,TRUE)) / Days(1))) is equivalent to DateSubtract($ResolvedDate,$CreatedOn,TRUE)

I don't see any issues using this, it should work.

Roland

Roland Pumputis 0 votes
Comment actions Permalink