Description
We can convert '2017-01-01' and '2017/01/01' to date, and we can convert '2017-01-01 00:00:00' to timestamp, but we can not convert '2017/01/01 00:00:00' to timestamp, can we have such enhancement. Or can we have to_date('2017/01/01 00:00:00','YYYY/MM/DD HH24:MI:SS')?
>>select to_date('2017/01/01','YYYY/MM/DD') from dual;
(EXPR)
----------
2017-01-01
— 1 row(s) selected.
>>select to_date('2017-01-01','YYYY-MM-DD') from dual;
(EXPR)
----------
2017-01-01
— 1 row(s) selected.
>>select to_timestamp('2017/01/01 00:00:00') from dual;
-
-
- ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data: 2017/01/01 00:00:00
-
— 0 row(s) selected.
>>
>>
>>
>>select to_timestamp('2017-01-01 00:00:00') from dual;
(EXPR)
--------------------------
2017-01-01 00:00:00.000000
— 1 row(s) selected.