convertduration
On this page
Convert duration data into the ISO 8601 format.
Introduction
Use the convertduration instruction to convert duration data (such as time spent on a page) into the ISO 8601 format. The ISO 8601 format stores duration data as integers.
Creating a custom script transformation using the convertduration instruction
To create and configure a custom script using the convertduration instruction, follow these steps:
-
In the Instruction step, select the convertduration instruction.
-
To configure the custom script instruction, fill in the following fields. Required fields are marked with an asterisk (*).
- Fields
Enter the names of the columns that contain the duration data to convert.
- Input duration format
Select the format of the duration data.
Example 1
Transformation configuration
- Fields
Ad view time (average)- Format
MM:SS
Data table before transformation
Scroll horizontally to see the full table.
Ad | Ad view time (average) |
|---|---|
Summer collection | 00:45 |
Winter sale | 01:01 |
Superbowl | 00:13 |
Data table after transformation
Scroll horizontally to see the full table.
Ad | Ad view time (average) |
|---|---|
Summer collection | 45 |
Winter sale | 61 |
Superbowl | 13 |