Parsed date error
Hello
There is an error when I am trying to do a parsed date
"Aww ... Smart Date could not find any format matching your data. Please try a custom format."
This is the error I am getting.
The date format I have is like this: December 27, 2010. and I whant to change to this 2010-12-27
Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,170 Neuron
Try “MMM DD,YYYY” as a custom format.
-
Sv3n-Sk4 Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 32 ✭✭✭✭
Hello @Santi
,
Not sure it's the best solution but it works.I would realise several steps in a prepare recipe :
- Split on a space delimiter your input column
- Replace the month by the corresponding number
- Split on a , delimiter (to delete the , after the day)
- Concatenate the columns with a - delimiter in the order you like
- Remove the useless columns
With these steps, I got the result you wanted.
Hope it helped !
Hadrien -
-
How can I replace the month to a number?
-
Hi,
The pattern you should use to parse the date in your example is MMM dd, yyyy
You can refer to the SimpleDateFormat documentation linked to the "Parse date processor": https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
Regards,
-
Sv3n-Sk4 Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 32 ✭✭✭✭