I have a table with a event_date text column with values following one of two date formats:
- 'YYYYMMDD'
- 'YYYY-MM-DD'
For example:
| event_date: text |
|---|
| 1991-04-01 |
| 2009-02-11 |
| 20010101 |
| NULL |
| 20020101 |
How might I parse that column into Date format?
Especially considering that TO_DATE() will take only one possible format