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.
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'
Format dates (older versions)
These are the docs for the older versions of the Format Dates step.
Input/output
The input data connected to this step must contain at least one column with data in a date format. In this example, we pass a column called 'Sales Date' that is currently formatted as M/D/YY.
We request the 'New Format' to be 'YYYY-MM-DD' by selecting from the dropdown, resulting in the output data appearing as '2024-02-01'.
Custom settings
When configuring the Format dates step, start by selecting the column(s) that you'd like to format. If there are multiple columns with the same starting format that you want to convert into a consistent new format, use the plus button to select multiple columns under 'Columns to Format'. Create a rule for each unique 'Starting Format' in your dataset and the 'New Format' that you'd like to apply.
Note that both the 'Starting Format' and the 'New Format' settings offer a dropdown menu of preset formats to choose from, but you can also define a custom format by typing directly into the text box below the dropdown. Refer to the table at the bottom of this page for the supported date formatting options. Note that date formatting is case-sensitive when entering a custom format.
Specify the 'Starting Format' of your incoming data by selecting from the dropdown, leaving the dropdown blank for Parabola to auto-detect, or entering a custom format. Parabola will only auto-detect your date column's starting format if the values are uniform. Note that this feature will evaluate the date values once and set the 'Starting Format' accordingly. It will not re-evaluate the date format every time the flow runs.
Similarly, for the 'New Format', you can either select from our preset format options or enter a custom format.
The 'Interval Start' option is useful for grouping dates by a certain time series. In the screenshot below, 'Week' is selected as our 'Interval Start' option, which backdates each date to the start of the week it falls in (default week start is Sunday). Choosing 'Day' sets the timestamp to the start of the day (00:00:00), 'Month' sets the date to the first of the month, and 'Year' sets the date to the first of the year.
By default, the Format date step will format the dates within the existing column. If you'd like to preserve the date formatting of your existing column, check the box next to 'Add New Column' and give your new column a name.
You can configure multiple date formatting rules within the same step by clicking '+ Add Rule'. Rules are applied top-down, so if you are formatting the same column in multiple rules, the second rule should use the 'New Format' from the first rule as the 'Starting Format' of the second rule.
Date formatting reference table