convertduration

Convert duration data into the ISO 8601 format.

This guide explains how to configure the convertduration instruction. To learn about another instruction, go back to the Available custom script instructions overview.

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 enrichment using the convertduration instruction

To create and configure a custom script using the convertduration instruction, follow these steps:

  1. Create a custom script enrichment.

  2. In the Instructions 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

Enrichment configuration

Fields

Ad view time (average)

Format

MM:SS

Data table before enrichment

Ad

Ad view time (average)

Summer collection

00:45

Winter sale

01:01

Superbowl

00:13

Data table after enrichment

Ad

Ad view time (average)

Summer collection

45

Winter sale

61

Superbowl

13