ORA-01830

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarANKUSH THAVALI
  • 07 Sep, 2023
  • 0 Comments
  • 24 Secs Read

ORA-01830

ORA-01830

Solution : 

  • TO_DATE must be used with FORMAT while converting string to date.
  • The FORMAT MUST match the string data
SQL> insert into emp values (101,'Learnomate',to_date('20-AUG-2023 09:54','dd-Mon-yyyy hh24:mi'));
1 row created.

SQL> select to_date('20-AUG-2023 09:54','dd-Mon-yyyy hh24:mi') from dual;
TO_DATE('
---------
20-AUG-23

SQL> select to_date('20-AUG-2023 09:54','dd-Mon-yyyy hh24:mi:ss') from dual;
TO_DATE('
---------
20-AUG-23


Hope it helps!