to_date, to_timestamp or date_format.
Automated migration results
When Import detects an Alteryx DateTime tool:- Prophecy adds an initial Reformat gem that attempts multiple common date-time patterns using
case … try_to_timestamp. This safely converts mixed date and timestamp values into a single timestamp before further transformations. - In a subsequent Reformat gem, Prophecy either uses
date_formatto format date or timestamp values as strings, or usesto_timestampto parse string values intotimestampvalues.
Alteryx implicitly converts timestamps to strings as needed in downstream tools. In some cases, Prophecy converts
timestamp values back to strings to accomodate this behavior.Manually replicate in Prophecy
Parse string types to timestamp values
Use when your input column is astring and you need a timestamp.
- Add a Reformat gem.
- Create a new column (such as
ts_normalized) configured with a function with atry_to_timestampfunction with the following arguments:- Column: column with strings to be parsed, such as
join_date. - Format: Timestamp format, such as
yyyy-mm-dd hh:mm:ss,yyyy-mm-d,mm/dd/yyy,mmmm d, yyyy.
- Column: column with strings to be parsed, such as
Format date or timestamp types as strings
Use when your input column is already adate or timestamp and you need a string output (for display, export, or downstream systems).
- Add a Reformat gem.
- Create a new column (such as
dt_formatted) configured with adate_formatfunction with arguments similar to the following:- Column: column with strings to be parsed, such as
join_date. - Format: Timestamp format, such as
yyyy-mm-dd hh:mm:ss,yyyy-mm-d,mm/dd/yyy,mmmm d, yyyy.
- Column: column with strings to be parsed, such as
Configuration options
In Alteryx (DateTime tool)
Choose the conversion direction:- Date/Time format to string
- String to Date/Time format
- Language for conversion (such as English, Chinese, or French)
- Field to convert
- New column name (or overwrite behavior, depending on workflow conventions)
- Format
- For Date/Time → string: choose the output format for the new string column
- For string → Date/Time: choose the format that matches the incoming string (for example,
yyyy-MM-dd hh:mm:ss) - Optional: Custom format (enter a custom pattern and preview the output)
In Prophecy (Reformat gem)
- Connect the dataset with timestamps/strings to a Reformat gem.
- In the Reformat gem, pick (or add) the Target Column you want to create or overwrite.
- In the expression builder, select an appropriate date-time function and configure it.
- For timestamp/date to formatted string, use
date_formatand configure the desired output format. - For string to date, use
to_dateand configure format for the input string (such asMMMM dd, yyyy). - For string to timestamp, use
to_timestampand configure format for the input string (such asMMMM dd, yyyy).
Output behavior
- Alteryx can output either a string representation of the date-time or a date-time value, depending on the selected operation.
-
Prophecy outputs whatever type your expression returns:
date_format(...)returns a string.to_timestamp(...)returns a timestamp.to_datereturns a date.
Known caveats
- Locale-sensitive parsing/formatting: Prophecy relies on Databricks SQL’s locale handling rather than an explicit language selector.
- Pattern mismatches: For string to timestamp conversions, the incoming pattern must match the input string exactly (otherwise parsing returns null or errors depending on runtime settings).
Example
Goal: Convert a string column calleddob stored as "December 16, 2025" into a date-time value.
Alteryx: string to date-time format
- Operation: String to Date/Time format
- Field:
dob - Incoming format:
MMMM dd, yyyy - New column:
dob_ts
Prophecy equivalent: Reformat gem
In a Reformat gem, add a Target Column calleddob_ts defined with a to_date function with the column dob and the value dd-mm-yyyy as arguments.
