shortFormatDuration()

This function returns a text representing a time duration (in milliseconds), i.e. the difference between two date-time values, using the current user's language. 

The returned value the most comprehensive short for of the duration.


Bash
shortFormatDuration(duration) #Output: Text


Examples

Parser  expression

Description

Bash
shortFormatDuration(2020-01-31 11:30 - 2020-01-30 00:00)

This example returns :

1d 11h 30m

(Given the user language is set to English.)

Bash
shortFormatDuration(60000)

This example returns :

1m

(Given the user language is set to English.)

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

duration

number

A number representing a duration (in milliseconds) or the calculation of a duration.

Output

This function returns a text

This function is extremely helpful when you want to automatically calculate the duration in JWT calculated text fields.

If you prefer a more detailed representation, please see formatDuration().

Function

Output

shortFormatDuration()

1d 11h 30m

formatDuration()

1 day, 11 hours, 30 minutes


📚 Use cases and examples