Hello! I am trying to make a classifier where I need to see the difference of dates and determine if they are on time. I am trying to do this script but it shows error in the index, any recommendations?
def diff = doc['tranDate_as_date'].value - doc['businessDate_as_date'].value;
def hrsdiff=diff/1000/60/60;
if (hrsdiff >23.5){
return "Delay"
}else{
return "On time"
}