var grRITM= new GlideRecord('sc_req_item');
if (grRITM.get('number', 'RITM0016049')){
//gs.print(grRITM.due_date.getNumericValue());
//gs.print(grRITM.due_date.getGlideObject());
var dateEntered=new GlideDateTime();
dateEntered.setDisplayValue(grRITM.due_date);
gs.print(dateEntered.getNumericValue());
var dateNow=new GlideDateTime();
dateNow.setDisplayValue(gs.nowDateTime());
gs.print(dateNow.getNumericValue());
if (dateEntered<dateNow){
gs.print('past');
}else{
gs.print('not-past');
}
}
Comments
Post a Comment