DISTANCE_OF_TIME_IN_WORDS

Returns the distance between two times in words for the provided date/time. Defaults to the current time if "from" is unspecified. Distances for seconds below 1 minute and 29 seconds are reported based on the following table:

0-4 secs # => less than 5 seconds 5-9 secs # => less than 10 seconds 10-19 secs # => less than 20 seconds 20-39 secs # => half a minute 40-59 secs # => less than a minute 60-89 secs # => 1 minute

Syntax 

DISTANCE_OF_TIME_IN_WORDS(date, [from])

Usage examples 

Example 1

Input

1
{
2
"my_action": {
3
"in_the_past": "2022-03-19T17:49:01+0000"
4
}
5
}

Formula

DISTANCE_OF_TIME_IN_WORDS(my_action.in_the_past)

Output

"over 1 year ago"

Example 2

Input

1
{
2
"my_action": {
3
"in_future": "2023-11-19T17:49:01+0000"
4
}
5
}

Formula

DISTANCE_OF_TIME_IN_WORDS(my_action.in_future)

Output

"in 24 days"

Example 3

Input

1
{
2
"my_action": {
3
"from_in_future": "2024-02-01T17:01:01+0000"
4
}
5
}

Formula

DISTANCE_OF_TIME_IN_WORDS('2024-02-01T20:31:01+0000', my_action.from_in_future)

Output

"in about 4 hours"

Sample Actions 

Transform
my action
Transform
DISTANCE_OF_TIME_IN_WORDS

Select an action to inspect

You can also click "Copy actions" and paste them in your Tines story to see how they work.

Was this helpful?