Additional Code explained in the tutorial
return () => { return getField("days",true)*100+getField("type",true); }
return () => { return getField("days",true)*100+getField("type",true); }
return () => { return calcDaysBetweenDates(); }
function calcDaysBetweenDates(){
var date1 = new Date(getField(“indate”));
var date2 = new Date(getField(“outdate”));
// To calculate the time difference of two dates
var Difference_In_Time = date2.getTime() – date1.getTime();
// To calculate the no. of days between two dates
var Difference_In_Days = Difference_In_Time / (1000 * 3600 * 24);
return Difference_In_Days;
}