View All Docs
Product overview
Account overview
Integrations
Transforms
Security
Hide Navigation
Product overview
Account overview
Integrations
Transforms
Security
Use case FAQs
Transforms  

Format dates

The Format dates step converts a column's date values into a new format. It's useful for standardizing date formats across various data sources' columns and making sorting by dates in ascending or descending order easier. This step can also convert between timezones and perform date rounding.

Select columns to reformat

First, select the columns that contain dates to format. Each rule card can be applied to any number of columns. The formats defined in the rule card will be used for all columns targeted by that rule.

Define the starting format

Use the first formatting menu to define the date format of the column(s) that you are targeting. Use a preset, build a custom format using the 'Insert element' dropdown within the format field, or click 'Auto-detect format' to use AI to find the correct starting format.

When creating a format, wrap any non-formatting character in single quotes. For example, '2024-01-01T10:30:59' should be represented as 'yyyy-M-d'T'H:m:s' with the 'T' character in single quotes. Punctuation does not need to be wrapped in single quotes, just letters or words that are not used to format.

If the format you have entered is valid, you will see an example date using that format below the formatting field.

Define the new format

Use the second formatting menu to define the new date format to convert to. Use a preset or build a custom format using the 'Insert element' dropdown within the format field.

When creating a format, wrap any non-formatting character in single quotes. For example, '2024-01-01T10:30:59' should be represented as 'yyyy-M-d'T'H:m:s' with the 'T' character in single quotes. Punctuation does not need to be wrapped in single quotes, just letters or words that are not used to format.

If the format you have entered is valid, you will see an example date using that format below the formatting field.

Formatting Pattern Reference

Date and time formats are based on the pattern strings from Java DateTimeFormatter.

Date Format Table
Format Pattern Example
Year with two digitsyy24
Year with four digitsyyyy2024
MonthM8, 08
Month with leading zeroMM08
Month as abbreviationMMMAug
Month as full nameMMMMAugust
First letter of the monthMMMMMA
QuarterQ3, 03
Quarter with leading zeroQQ03
Quarter with leading QQQQQ3
Quarter ordinalQQQQ3rd quarter
Day of year without leading zeroD68
Day of year with leading zerosDD068
Day of monthd5, 05
Day of month with leading zerodd05
Day as abbreviationETue
Day as full nameEEEETuesday
First letter of the dayEEEEET
Day of week without leading zeroe2
Day of week with leading zeroee02
24-hour clock (0-23 or 00-23)H9
24-hour clock with leading zero (00-23)HH09
12-hour clock (1-12 or 01-12)h9
12-hour clock with leading zero (01-12)hh09
24-hour clock without leading zero (1-24)k9
Upper-case AM / PMaAM
Minutem2, 02
Minute with leading zeromm02
Seconds2, 02
Second with leading zeross02
Fractional secondS.9
Fractional secondSS.98
Fractional secondSSS.987
Fractional secondSSSS.9875
Unix timestamp (seconds)unix_seconds1691363945
Unix timestamp (milliseconds)unix_milliseconds1691363945000
Time-zone IDVVAmerica/Los_Angeles
Time-zone namezzPST
Zone offset “Z” for zeroX-07
Zone offset “Z” for zeroXX-0700
Zone offset “Z” for zeroXXX-07:00
Zone offsetx-07
Zone offsetxx-0700
Zone offsetxxx-07:00

Timezone conversion

To the left of the format fields are icons that represent timezones. The default settings will not convert timezone. Use the timezone menus to define the starting timezone and the new timezone. If a timezone token is provided in the starting format, Parabola will read the timezone directly from the input dates.

Date rounding

Use the date rounding field to round the dates during the formatting process to a specific date-time precision. Use the menu to round to the start or the end of a year, month, week, day, hour, minute, or second.

When using the week option, use the additional field to define the starting day of the week.

Rounding examples:

Round to the end of the month

  • Input: February 15, 2024
  • Output: February 28, 2024

Round to the start of the week. Weeks start on Tuesday

  • Input: Wednesday June 5, 2024
  • Output: Tuesday June 4, 2024

Round to the end of the week. Weeks start on Thursday

  • Input: Wednesday June 5, 2024
  • Output: Wednesday June 5, 2024

Creating new columns

Each rule can either format the dates in their respective input columns, or create a new column for each new format to be placed in. Each column targeted by a rule can be formatting into a new separate column.

Failure settings

If an input date format cannot be formatted, use the failure settings to define what the step does.

  • Fail the entire step run
  • Keep the date in its original format (default)
  • Convert the date to a blank
  • Fallback to this value…

Columns with multiple formats

If you have a column with multiple formats in the same column, use multiple rule cards to target each format in that column. When taking this approach, be sure to keep your failure setting set to 'Keep the date in its original format'

Getting the week number

If want to get the week-of-the-year number for a date, Custom Transforms are able to calculate that

Contents