Custom Duration Format

Constructing a custom duration format

Analytics Plus allows you to use and display the time duration period in various formats. You can customize the duration format at the workspace level (for all the tables in the workspace) or table level (for a particular table).

Note: While importing duration data into Analytics Plus, ensure the duration format is specified as in your source data. You can later change this in your table as required.

Duration format strings

The following table lists all the duration format strings available in Analytics Plus.

StringDescription
Seconds
%sThis string indicates the duration in seconds
%SSSThis string indicates the duration in milliseconds
%SSSSSSThis string indicates the duration in microseconds
Minutes
%mThis string indicates the duration in minutes
Hours
%HThis string indicates the duration in hours
Days
%DThis string indicates the duration in days

Separators

Analytics Plus lets you use any element as a separator for duration. You can also use a different separator for each element. The following are a few examples of standard patterns.

  • 45 days 18 hrs 31 mins 27 secs (Space is used as a separator)
  • 45 days 18:31:27 (Space and colon is used as a separator)
  • 45 days 18.31.27 (Space and period is used as a separator)
  • 45.18:31:27 (Period and colon is used as a separator)

Examples

The following table lists a few examples of different duration format strings.

FormatExample
Single element
%s13456829
%s Sec13456829 Sec
%SSS586
%SSS Millisecond586 Millisecond
%SSSSSS586709
%SSSSSS Microsecond586709 Microsecond
%m86
%m mins86 mins
%H234
%H hrs234 hrs
%D45
%D days45 days
Seconds and milliseconds or microseconds
%s.%SSS13456829.586
%s.%SSSSSS13456829.586709
Hours and minutes
%H:%m234:33
%H.%m234.33
%H hrs %m mins234 hrs 33 mins
%H/%m234/33
Hours, minutes and seconds
%H:%m:%s234:33:44
%H.%m.%s234.33.44
%H hrs %m mins %s secs234 hrs 33 mins 44 secs
%H h %m m %s s234 h 33 m 44 s
%H/%m/%s234/33/44
Days and hours
%D:%H45:18
%D.%H45.18
%D Days %H hrs45 days 18 hrs
%D/%H45/18
Days, hours, minutes and seconds
%D:%H:%m:%s45:18:31:27
%D.%H.%m.%s45.18.31.27
%D days %H hrs %m mins %s secs45 days 18 hrs 31 mins 27 secs
%D/%H/%m/%s45/18/31/27
%D Days %H:%m:%s45 days 18:31:27
%D.%H:%m:%s.%SSSSSS45.18:31:27.586709
In swap position
%m mins %H hrs %D days31 mins 18 hrs 45 days

Share this post : FacebookTwitter