Format date transform function

Introduction

The format transform function is used to change a date value to a different format. For example:

ISO 8601 format
"created_at":"2023-10-26T07:51:07-04:00"

...might be changed to:

Unix Epoch format
1698321067

A range of predefined date formats is available for selection, or you can set your own custom format.

Adding a format date transform

Step 1 In your process flow, access settings for your map shape:

Step 2 Select the add transform button for the required mapping rule - for example:

Step 3 Click the add transform button:

Step 4 Click in the name field to access a list of all available transform functions, then select format from the date category:

Step 5 Click in the format field to select a predefined date format that incoming dates should be converted to:

Step 6 Click the add field button:

Step 7 Click in source fields and select the source field to be used for this transform:

Step 8 Accept your changes (twice).

Step 9 Save the transform. You'll notice that the transform icon is updated to indicate that a transform function is present for the mapping row - for example:

Common format specifiers for custom dates

Internally, the format transform function uses Laravel's date format methods, which in turn call PHP date format methods. Commonly used format specifiers are listed below - full details are available in this Laravel guide.

The following characters are commonly used to specify days in custom format dates.

SpecifierSummary

d

Day of the month with leading zeros (01 to 31).

j

Day of the month without leading zeros (1 to 31).

D

A textual representation of a day in three letters (Mon to Sun)

l

A full textual representation of the day of the week (Monday to Sunday)

The following characters are commonly used to specify months in custom format dates.

SpecifierSummary

m

Numeric representation of a month with leading zeros (01 to 12).

n

Numeric representation of a month without leading zeros (1 to 12).

M

A textual representation of a month in three letters (Jan to Dec)

F

A full textual representation of a month (January to December).

The following characters are commonly used to specify years in custom format dates.

SpecifierSummary

Y

Four-digit representation of the year (e.g. 2023).

y

Two-digit representation of the year (e.g. 23).

The following characters are commonly used to specify times in custom format dates.

SpecifierSummary

H

Hour in 24-hour format with leading zeros (00 to 23).

i

Minutes with leading zeros (00 to 59).

s

Seconds with leading zeros (00 to 59).

a

Lowercase Ante meridiem (am) or Post meridiem (pm).

A

Uppercase Ante meridiem (AM) or Post meridiem (PM).

Usage notes

Unix Epoch format

Unix Epoch dates must be received as a number, not a string - i.e.:

1701734400 rather than "1701734400"

If your Unix dates are provided as strings, you should convert these to numbers. To achieve this, add a cast to number transform for the date field BEFORE the date format transform function.

Last updated