convertduration#

Convert duration data into the ISO 8601 format.

Note

This guide explains how to configure the convertduration instruction. To learn about another instruction, go back to the Custom scripts available in Adverity 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 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 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#

Transformation configuration#

Fields

Ad view time (average)

Format

MM:SS

Data table before transformation#

Ad

Ad view time (average)

Summer collection

00:45

Winter sale

01:01

Superbowl

00:13

Data table after transformation#

Ad

Ad view time (average)

Summer collection

45

Winter sale

61

Superbowl

13