Administer > Database Administration > Data persistence > Queries > Use the tod function in a greater than or less than query

Use the tod function in a greater than or less than query

Applies to User Roles:

System Administrator

Example: Retrieve all operator records where the password was updated within the past 100 days, or where the password has not been updated in the past 100 days.

In this example, we use the greater than (>) or less than (<) operator, in conjunction with the tod function, to perform an Advanced Search on records in the operator.qbe form.

To use the tod function in a greater than or less than query:

  1. Click Tailoring > Database Manager.
  2. Type =operator in the Form field, and then click Search.
  3. On the Operator Record form, open the More Actions menu.
  4. Select Expert Search.
  5. In the Query field, type password.date>tod() - '100 00:00:00', and then click Search.
  6. Click any record in the list of returned records to view the details.

Note: Typing password.date<tod() - '100 00:00' in Step 5 returns the opposite result, where the password has not been changed in 100 days or more.