var incNumber = 'INC5342xxx';
var grInc = new GlideRecord('incident');
grInc.addQuery('number', incNumber );
grInc.query();
if (grInc.next()) {
gs.print(grInc.sys_created_on);
//--FIX:
gs.print(grInc.sys_created_on.getDisplayValue());
//--to remove 'BST' from email notification:
var incCreated = grInc.sys_created_on.getDisplayValue();
var sDate = incCreated.toString();
var sDateFormatted = sDate.substring(0, 19); //--remove 'BST'
}
//--to remove 'BST' from email notification:
var incCreated = grInc.sys_created_on.getDisplayValue();
var sDate = incCreated.toString();
var sDateFormatted = sDate.substring(0, 19); //--remove 'BST'
}
*** Script: 2022-03-28 10:24:36
*** Script: 28-03-2022 11:24:36
Comments
Post a Comment