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.

Related topics

Record retrieval
Relational operators
The Database Manager utility
Using functions in a query
More Actions menu

Create a query using not in statements
Create a query using an or statement or an and statement
Use like queries to search for a string of characters
Use the index function in a query
Use the lng function in a query

Service Manager Programming