Skip to content
Book a demo

Connect documentation

All documentation
Documentation

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:

  1. Create a custom script transformation.

  2. In the Instruction step, select the convertduration instruction.

  3. 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