...
- Inputs can be of any type.
- If the input is not a Datetime value and does match one of the specified formats, the output is in the following format:
yyyy-MM-dd HH:mm:ss
. - If the input is a Datetime value and does match, the output is in the input's Datetime format.
Info |
---|
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.
...
When the above step is added to the recipe, the output is as follows:
MyDateStrings | myParsedDates |
---|---|
2/1/00 14:20 | 2000-02-01 14:20:00 |
4/5/10 11:25 | 2010-04-05 11:25:00 |
6/7/99 22:00 | 1999-06-07 22:00:00 |
13/7/1999 22:00 | 13/7/1999 22:00 |
12-20-1894 15:45:00 | 1894-12-20 15:45:00 |
08-12-1956 22:01:04 | 1956-08-12 22:01:04 |
The output myParsedDates
column is retyped as a Datetime column with one mismatched value: 3/7/1999 22:00
.
...
D trans | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Results:
MyDateStrings | myParsedDates |
---|---|
2/1/00 14:20 | 2000-02-01 14:20:00 |
4/5/10 11:25 | 2010-04-05 11:25:00 |
6/7/99 22:00 | 1999-06-07 22:00:00 |
13/7/1999 22:00 | 1999-07-13 22:00:00 |
12-20-1894 15:45:00 | 1894-12-20 15:45:00 |
08-12-1956 22:01:04 | 1956-08-12 22:01:04 |
For more information on supported date formats, see Datetime Data Type.
...