You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

The function returns a text, similar to the function formatDuration(), but using the work day and work week defined at time tracking configuration, instead of 24 hours per day and 7 days a week. 

Syntax
formatWorkDuration(duration) #Output: Text
Examples
Parser expressionDescription
formatWorkDuration(5 * 8 * {HOUR} + 2 * 8 * {HOUR} + 3 * {HOUR})

This example returns : "1 week, 2 days, 3 hours"

With 8 hours per workday and 5 days per workweek.

{HOUR} is a time macro.

Additional information

Parameters used in this function

ParameterInput (data type)Description
duration

NUMBER

A number representing a duration or the calculation of a duration.
Output

The function returns a TEXT

If you prefer a more detailed representation, have a look at the shortFormatWorkDuration() function.

formatWorkDuration()shortFormatWorkDuration()
"1 week, 11 days, 3 hours"."1w 11d 3h"