In CRM Analytics, if a text column contains dates in different formats, use the Format
Dates recipe transformation in a Data Prep recipe to standardize the format for all dates in the
column. A consistent format enables you to correctly filter and group records by date, including
filtering by date component, such as month. It also ensures you can successfully convert the
column type from text to date. Optionally, you can convert the column type from Text to Date.
Required Editions
Format Dates Transformation: Standardize the Date Format in a Column
In CRM Analytics, if a text (dimension) column contains dates in different formats,
use the Format Dates recipe transformation in a Data Prep recipe to standardize the format
for all dates in the column. A consistent format enables you to correctly filter and group
records by date, including filtering by date component, such as month. It also ensures you
can successfully convert the column type from text (dimension) to date. Optionally, you can
convert the column type from Text to Date.
| User Permissions
Needed |
| To create a recipe: |
Edit Analytics Dataflows OR Edit Dataset Recipes |
- In a Transform node of a Data Prep recipe, select the text (dimension) column that
contains dates in the Preview tab.
- In the Transform toolbar, click the Format Dates button (
).
- Enter the original date formats in the selected column.
- Select the desired date format in the Change To field.
- To convert a text (dimension) column with dates to a Date column type, select
Convert column type to Date.
- Under Show Results In, select whether the new values appear in a new column and whether
to keep the original column.
- If you elect to create a column, set the label under Column Label.
- Click Apply to add the transformation to the Transform node.
- To view the Graph area, click the Collapse button (
).
When you run the recipe, the transformation replaces the dates in the existing column with
dates in the specified format. If the date's original format can't be determined or the date
doesn’t have a value for a date component, the transformation replaces the date with null.
For example, if you standardize on the MM/dd/yyyy:hh:mm:sssz format and
a date value doesn’t have the seconds date component (sssz), then the
transformation replaces the date with null.