Saurav11
Kilo Patron

Hello Priyanka,

If you want to calculate difference between two dates and also have schedule to follow you can use the below, it will return the value in milleseconds.

var dc = new DurationCalculator();
dc.setSchedule('sysidoftheschedule');
var time = dc.calcScheduleDuration(date1,date2);

Please mark answer correct/helpful based on Impact.