Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Basic

Like with numeric fields, you can do different comparisons:

Code Block
{deadline}.Matches("2018", ">=")
{deadline}.Matches("2018-10-10", ">=")
{deadline}.Matches("2018-10-10", ">=", "2019-2-2", "<")
{deadline}.Matches("2018-12-25:10:45:20Z", "!=")

Important:

  • Dates are always interpreted as UTC.
  • Partial date/times are automatically expanded. Example: "2018" is converted to 2018-01-01 00:00
  • See below for permitted date formats

 

Date formats

Formats that are supported are:

    • 2018
    • 2018-10
    • 2018-10-25
    • 2018-10-25 22:30:00 or 2018-10-25T22:30:00 or 2018-10-25T22:30:00Z
    • 2018-10-25 22:30:00.123 (append fraction of seconds) + variants as before
    • Full round trip format: 2009-06-15T13:45:30.0000000Z

Note: Partial date/times are automatically expanded. Example: "2018" is converted to 2018-01-01 00:00

Null values

Find null values with fields that are nullable:

Code Block
{deadline}.Matches(null)
{words}.Matches(null, "!=")
Filter day or month

All deadlines on a day (UTC):

Code Block
{deadline}.Matches("2018-10-25", ">=") AND {deadline}.Matches("2018-10-26", "<")

All deadlines in a month (UTC):

Code Block
{deadline}.Matches("2018-10", ">=") AND {deadline}.Matches("2018-11", "<")
Date offsets

Sometimes it is easier to filter by a date offset.

For example: Find jobs with a deadline of tomorrow. This can be expressed with "1d". More examples:

  • "1y 2m" : 1 year and 2 months into the future
  • "-2d": 2 days into the past
  • "+4 M": 4 minutes into future
  • "24H 30M 20S": 24 hours, 30 minutes and 20 seconds into the future

You can thus use one or more combinations of:

  • y, m, d: Year, Month, Day
  • H, M, S: Hours, Minutes, Seconds

 

Deadline within +/- 6 hours:

Code Block
{deadline}.Matches("-6H", ">=") AND {deadline}.Matches("+6H", "<=")

All objects created since 1 year and 6 months:

Code Block
{created}.Matches("-1y 6m", ">=")

 

Boolean filtering

Basic

Valid examples:

Code Block
{mybool}.Matches(true)
{mybool}.Matches(false)
{mybool}.Matches(null)             // Field is not set (null)
{mybool}.Matches(null, "!=")       // Fiield is set and either true or false

Permitted operators are: "=" and "!=".

 

...