Business Duration vs. Duration

John Vo1
Tera Guru

Can someone please explain what these 2 attributes are actually tracking and where these numbers are being generated from?   I have attached a screen shot.

Thanks,

John

22 REPLIES 22

Mike Allen
Mega Sage

calDateDiff: Calculate the difference between two dates using the default calendar.



if (dataChange || current.business_duration.nil())


  current.business_duration = gs.calDateDiff(opened, closed, false);



dateDiff: Calculates the difference between two dates. The parameters must be in the user/system date time format.



if (dataChange || current.calendar_duration.nil())


  current.calendar_duration = gs.dateDiff(opened, closed, false);



Looks like it happens on resolve and again on close if they ticket skipped resolve.


FWIW, calendars have been deprecated in place of schedules (per the gs.calDateDiff docs.) It appears some developers have some updating to do on some older business rules.



GlideSystem Date and Time Functions - ServiceNow Wiki


Technical Debt is a heck of a thing.