ZenQL search – relative time period
A relative time period is a token that can convert a date and time value, relative to the current date and time (UTC). It can be used in an operator or as a parameter of a date time function.
The token consists of 1 or more space-delimited segments and can optionally contain a preceding plus or minus sign. The sign can only be used once and is applied to the whole expression. When combining segments, there is no need enclose them in double quotes.
[- | +]<segment>[ <segment> ...n]
- Show all items that have been created in the last 24 hours.
sys.version.created >= -1d
- Used stand-alone to list records created in the last month plus 1 week.
sys.version.created >= -1M 1w
- Used as a parameter to an Expression Function to list records created last year. The year is inferred by the date function.
sys.version.created >= startOfYear(-1) and <= endOfYear(-1)