Abhijeet_Pawar
Tera Guru

Hello @shid077 ,

Use below script which will resolve your issue.

var incidentGR = new GlideRecord('incident');
var sixMonthsAgo = new GlideDateTime();
sixMonthsAgo.addMonthsUTC(-6);
incidentGR.addQuery('sys_created_on', '>=', sixMonthsAgo);
incidentGR.query();
while (incidentGR.next()) {
    var incidentNumber = incidentGR.getValue('number');
    var shortDescription = incidentGR.getValue('short_description');
    
gs.info('Incident Number: ' + incidentNumber +"\n"+'Short Description:'+shortDescription);
}
 

If my response helps you resolve your issue. Kindly mark it as helpful & correct. It will be helpful to future readers! 

Thanks and Regards,
Abhijeet Pawar.