Evaluates an input against the default input formats or (if specified) an array of Datetime format strings in their listed order. If the input matches one of the formats, the function outputs a Datetime value.

NOTE: Parsing of dates may depend on how dates are recognized by the running environment where the transformation is executed. In some cases, locale settings for the backend running environment may be different from your user locale settings, which affect how values are interpreted in the Transformer page. If you are having difficulties with execution of the PARSEDATE function, you can try to set your locale settings to U.S. to fix your recipes. This is a known issue. 

After you have converted your strings values to dates, if a sufficient percentage of input strings from a column are successfully converted to one of the matching formats, the column may be retyped as Datetime.

parsedate(strDate, ['yyyy-MM-dd','yyyy-MM','yyyy/MM','yyyy-MM-dd'])

Output: Returns a value structured in  yyyy-MM-dd HH:mm:ss  format if the input value in strDate matches any of default formats, which are the following:

'yyyy-MM-dd HH:mm:ss' 
'yyyy/MM/dd HH:mm:ss' 

parsedate(strDate, ['yyyy-MM','yyyy/MM',])

Output: Returns a value structured in  yyyy-MM-dd HH:mm:ss  format if the input value in strDate matches any of the listed formats for dates.

parsedate(date_col, date_formats_array)

ArgumentRequired?Data TypeDescription
date_colYanyLiteral, name of a column, or a function returning values to match
date_formats_arrayNstring(optional) An array of date format strings that are used to match against input values.


Literal, column name, or function returning values that are to be evaluated for conversion to Datetime values.

Required?Data TypeExample Value
Yesany'February 24, 2019'


Array of String values of the date formats to evaluate the inputs.

yyyy-MM-dd HH:mm:ss

supports Java formatting strings, with some exceptions.

NOTE: If the platform cannot recognize the date format string, a null value is written as the output.

Required?Data TypeExample Value
NoArray of Strings['yyyy-MM','yyyy/MM']

Example - formatting date values

This example illustrates several ways of wrangling heterogeneous date values, including the use of the DATEFORMAT function.


Your dataset includes the following messy date values:

2/1/00 14:20
4/5/10 11:25
6/7/99 22:00
13/7/1999 22:00
12-20-1894 15:45:00
08-12-1956 22:01:04


To enable easier comparison in the data grid, you choose to create a new column with the parsed values. From the above, you identify two date formats:

'MM/dd/yy hh:mm'
'MM/dd/YYYY hh:mm:ss'

NOTE: Since only one of the above formats matches the default formats, you must specify both in the transformation to perform the proper evalation.

You create the following transformation to parse them:

When the above step is added to the recipe, the output is as follows:

2/1/00 14:202000-02-01 14:20:00
4/5/10 11:252010-04-05 11:25:00
6/7/99 22:001999-06-07 22:00:00
13/7/1999 22:0013/7/1999 22:00
12-20-1894 15:45:001894-12-20 15:45:00
08-12-1956 22:01:041956-08-12 22:01:04

The output myParsedDates column is retyped as a Datetime column with one mismatched value: 3/7/1999 22:00.

This value does not match any of our date formats specified in the array. The solution is to modify the recipe step to include the appropriate format as part of the array:


2/1/00 14:202000-02-01 14:20:00
4/5/10 11:252010-04-05 11:25:00
6/7/99 22:001999-06-07 22:00:00
13/7/1999 22:001999-07-13 22:00:00
12-20-1894 15:45:001894-12-20 15:45:00
08-12-1956 22:01:041956-08-12 22:01:04

Example - type parsing functions