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.
String | Description |
Seconds | |
%s | This string indicates the duration in seconds |
%SSS | This string indicates the duration in milliseconds |
%SSSSSS | This string indicates the duration in microseconds |
Minutes | |
%m | This string indicates the duration in minutes |
Hours | |
%H | This string indicates the duration in hours |
Days | |
%D | This 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.
Format | Example |
Single element | |
%s | 13456829 |
%s Sec | 13456829 Sec |
%SSS | 586 |
%SSS Millisecond | 586 Millisecond |
%SSSSSS | 586709 |
%SSSSSS Microsecond | 586709 Microsecond |
%m | 86 |
%m mins | 86 mins |
%H | 234 |
%H hrs | 234 hrs |
%D | 45 |
%D days | 45 days |
Seconds and milliseconds or microseconds | |
%s.%SSS | 13456829.586 |
%s.%SSSSSS | 13456829.586709 |
Hours and minutes | |
%H:%m | 234:33 |
%H.%m | 234.33 |
%H hrs %m mins | 234 hrs 33 mins |
%H/%m | 234/33 |
Hours, minutes and seconds | |
%H:%m:%s | 234:33:44 |
%H.%m.%s | 234.33.44 |
%H hrs %m mins %s secs | 234 hrs 33 mins 44 secs |
%H h %m m %s s | 234 h 33 m 44 s |
%H/%m/%s | 234/33/44 |
Days and hours | |
%D:%H | 45:18 |
%D.%H | 45.18 |
%D Days %H hrs | 45 days 18 hrs |
%D/%H | 45/18 |
Days, hours, minutes and seconds | |
%D:%H:%m:%s | 45:18:31:27 |
%D.%H.%m.%s | 45.18.31.27 |
%D days %H hrs %m mins %s secs | 45 days 18 hrs 31 mins 27 secs |
%D/%H/%m/%s | 45/18/31/27 |
%D Days %H:%m:%s | 45 days 18:31:27 |
%D.%H:%m:%s.%SSSSSS | 45.18:31:27.586709 |
In swap position | |
%m mins %H hrs %D days | 31 mins 18 hrs 45 days |
Customizing duration format column
Analytics Plus lets you customize the duration formats, either at the workspace level (common to all the tables) or table level (for a particular table).
Workspace level
Follow the steps below to use a common duration format for all the tables in the workspace.
- Open the required workspace's settings page, and navigate to the Format > Duration tab.
- Choose the preferred format from the available list or enter a custom format in the Enter your format if it is not listed above field, and click OK.
- Enable the Apply this setting to all existing Tables/Views checkbox to apply the new duration format to all the existing tables in the workspace.
- Click Save.
Table level
Follow the steps below to change the duration format for a particular table.
- Open the required table.
- Select the duration column and click More > Format Column.
- In the dialog that appears, choose the preferred format from the available list or enter a custom format in the Enter your format if it is not listed above field, and click OK.
Editing duration values
To edit the duration column values, follow the steps below.
- Open the required table.
- Click the duration icon that appears on mouse over the table cell to be updated. Or double-click the desired cell and click the duration icon.
- Modify the required values.