Date
Compute a date
Definition
Despite its name, the Date
function operates on, and returns, timestamps. It is used to shift timestamps by an interval of seconds, minutes, hours or days, to the past or the future.
The Date
function comprises several essential components:
- Date: The reference point upon which the function operates. It can either be a static date or a dynamic one, such as Now).
- Operation: It involves either adding or subtracting a specific period of time.
Date Comparison Operations
Date comparison operations involve using comparison operators (like
<
,>
) to determine the relationship between two dates. For example:
date1 < date2
: True ifdate1
is beforedate2
.date1 > date2
: True ifdate1
is afterdate2
.These operations help in determining the relative order of dates.
Example
Let's say we aim to verify whether the transaction date falls within the past 7 days.
-
Select the Function: Choose the "Date" function to compute the date from 7 days ago.
-
Create the date: Use the dedicated modal to compute the date, using the Now function as the reference point
-
Save and View: After saving, the date will be displayed in the builder
Updated 4 months ago