Scoped GlideSystem - daysAgoStart(Number days)

Returns the date and time for the beginning of the day a specified number of days ago.

Table 1. Parameters
Name Type Description
days String Integer number of days
Table 2. Returns
Type Description
String GMT start of the day in the format yyyy-mm-dd hh:mm:ss

var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('state', 'requested');
gr.addQuery('sys_updated_on', '<', gs.daysAgoStart(5));
gr.query();