Skip to main content

Datetime

Definition

A datetime value, represented as a string in the format "YYYY-MM-DD HH:MM:SS". The "datetime" type includes both date and time information, and is typically used to represent timestamps in the local time zone of the system or application where it is being used. It also has built-in time zone handling, which allows it to handle time zone conversions and daylight saving time adjustments automatically.

dimension order_shipped_at {
label: "Order Shipped At"
type: "datetime"
}

Datetime Operator

OperatorExampleMeaningDescription
== - orders.created_at == @2022
- orders.created_at == @(last 7 days)
- orders.created_at equal to 2022-01-01 00:00:00
- orders_created_at equal to the first timestamp of the last 7 days
Convert the condition input to an absolute timestamp, and include data that match this condition
is
matches
match
- orders.created_at is @2022
- orders.created_at match @(last 7 days)
- orders.created_at is in the period of the year 2022
- order.created_at is in the period of the last 7 days
Convert the condition input to a time period, and include data that match this condition
!=orders.created_at != @2022-01- orders.created_at is not equal to 2022-01-01 00:00:00Convert the condition input to an absolute timestamp, and exclude data that match this condition
is notorders.created_at is not @2022-01- orders.created_at is not in the period of 2022-01Convert the condition input to a time period, and exclude data that match this condition
>orders.created_at > @(yesterday)- orders.created_at is after yesterdayInclude data that are after a specific time period
<orders.created_at < @2022- orders.created_at is before the year 2022Include data that are before a specific time period

Let us know what you think about this document :)