Count Number of Days
SI Function:
daysToDueDate: function(incident) {
var totalDuration;
var now = new GlideDateTime().getLocalDate();
if (!incident.dueDate.nil()) {
var dueDate = new GlideDateTime(incident.duedate).getDate();
totalDuration = new GlideDateTime.subtract(now, dueDate);
var numberofDays = parseInt(totalDuration.getNumericValue() / 86400000);
}
return nubmerOfDays;
},
Comments
Post a Comment