Skip to main content

Date

Definition

This type is commonly used to represent dates in various applications and systems. For example, it can be used to represent the date when an event occurred, the date when a document was created, or the date when a payment was made. The "Date" type does not include any time information, and is typically used to represent dates in the local time zone of the system or application where it is being used.

dimension user_birth_date {
label: "User Birth Date"
type: "date"
}

Date 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

Date Format

For date formating in the dimension definition, please refer to AML Date Format


Let us know what you think about this document :)