Below are some samples of date from a column in my database. Currently, these date values are stored in varchar and I am planning to set these value as timestamp in another table.
How can I set a default rules to cast all the invalid date format to a NULL value or some sort of '00/00/0000 00:00:00" format?
pickup_time
01/01/2016 07:35:00
00:00:00
31/12/2015
07:35:00
Expectation:
pickup_time
01/01/2016 07:35:00
NULL
31/12/2015 00:00:00
00/00/0000 07:35:00