Important: The following steps are only relevant to a Microsoft SQL Server database, as the document will take advantage of built-in SQL-transact functions for retrieving the current system time on the SQL server.
1- Create a new query in ITCM to return "Computer" objects:

2- Select Inventory.Discovered Inventory from the query designer:

(The "Add Argument" window will appear)
3- From the "Add Argument" window, select Information.Inventory.General Inventory.System Status.Software Signature File Delivery Date:

- Change the "Operator" to "<".
- The "Value" is irrelevant as we will be manually modifying the SQL of the query to compare the reported time to the current time on the SQL server.
- Press "OK" to return to the query designer.
4- Right click on the item generated in the query designer and select, "Edit SQL...":

5- Scroll to the right to locate the date inputted by the "Add Argument" window:

6- Change the "hard-coded" date to read, "DATEDIFF(s, '19700101', GETUTCDATE()) - 864000":

- By using the DATEDIFF() and GETUTCDATE() functions built-in to MS-SQL, we can compare the reported time of the file from the agent to the current time on the SQL server.
- The AM agent reports the delivery date of the signature XML file in GMT, hence we are using the GETUTCDATE() function from SQL to compare the current time in GMT.
- In this example, the constant, "864000", represents the number of seconds in ten (10) days of time. If you wish to query a shorter or longer interval, adjust this value for the number of seconds you desire for your interval.
- Press "OK" to return to the query designer.
7- You can "Preview" the results of the query and save with a meaningful query name:
