How to get the Duration in a schedule for a calculated field?

Navaneeth1
Tera Guru

I have a ServiceNow calculated field (type: Duration) which has a function definition. The function definition I've given is: "glidefunction:datediff(closed_at, sys_created_on)"

This calculates the time difference between when a ticket was closed and when it was open. I'd like this duration to be calculated considering the schedule "8-5 weekdays excluding holidays". Is there any way to do this as a function definition itself for a calculated field?

1 REPLY 1

AndersBGS
Tera Patron
Tera Patron

Hi @Navaneeth1 ,

 

No, this is not possible in a calculated field. 

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

best regards
Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/