Hello Martin,
My suggestion is to try this: DateSubtract(Now(), $CreatedOn,TRUE)
I hope this helps.
Roland
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
Please sign in to leave a comment.
Hello Martin,
My suggestion is to try this: DateSubtract(Now(), $CreatedOn,TRUE)
I hope this helps.
Roland
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
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