Keragon’s Transform to Relative Time action converts a datetime into a human-readable relative time format. Instead of absolute dates, this action returns results like "4 years ago"
or "in 1 year"
. This is especially useful for creating user-friendly messages, timelines, and notifications.
How to Use the Transform to Relative Time Helper
-
Open your workflow editor.
-
Click the + icon to add a new step.
-
In the step selection panel, click "Helpers".
-
From the Helpers options, select "Date and Time Helpers".
-
Choose the "Transform to Relative Time" action.
-
Click the Datetime Value field.
-
Use the Variable Selector to map the datetime value you want to transform.
-
Set the Format of Datetime Value field to match the format of the input datetime.
-
(Optional) Configure:
-
Timezone of Datetime Value (Defaults to UTC).
-
Return Relative Value Without the Suffix:
-
True
: Returns relative time without suffix (e.g.,"4 years"
). -
False
: Returns full relative time (e.g.,"4 years ago"
).
-
-
-
Set Compare with a Custom Now to
True
orFalse
:-
False
(Default): Compares against the current datetime. -
True
: Provides a custom comparison datetime (additional fields will appear).
-
-
Click "Save" to apply changes.
-
Click "Test Step" to preview the result.
-
Go to the Outputs tab to view the relative time result.
Example Results:
-
Input Datetime:
"2022-06-01T10:00:00Z"
-
Output:
"2 years ago"
-
Input Datetime:
"2026-01-01T00:00:00Z"
-
Output:
"in 1 year"