Skip to main content

Datetime Literals

Datetime literal represents a single timestamp or a range of time. They are typically used with datetime comparison operators.

Structure

Datetime literal start with @ token. Datetimes can be expressed in a fully supported format as @YYYY-MM-DD HH:MM:SS, in shorter variations like @YYYY-MM, or relative datetime (relative to the current real world time) like @(last 7 days).

Examples

Fixed date
@2023
@2023-04
@2023-04-01
Fixed range
@2023 - 2023
@2023-04 - 2023-05
@2023-04-01 - 2023-04-30
Relative datetime
@(yesterday)
@(last 7 days)
@(last 3 months)

Let us know what you think about this document :)