create table hdate ( hidate Date ); insert into hdate values(2019-04-23);
how shall I solve this problem?
Advertisement
Answer
insert into hdate values(2019-04-23);
You must pass the value using single quotes along with proper format mask and convert it into date using TO_DATE:
insert into hdate values( TO_DATE('2019-04-23', 'YYYY-MM-DD') );
Or, better use ANSI Date literal which uses a fixed format 'YYYY-MM-DD'
:
insert into hdate values(DATE '2019-04-23');