GlideSystem - daysAgoStart(Number days)

Returns a date and time for 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

Scoped equivalent

To use the daysAgoStart() method in a scoped application, use the corresponding scoped method: Scoped GlideSystem - daysAgoStart(Number days).

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