My table has two DATE format attributes, however, when i try to insert value it throws an error: date format picture ends before converting entire input string. Here is my attempted code:
insert into visit
values(123456, '19-JUN-13', '13-AUG-13 12:56 A.M.');
I think the problem is with 12:56
but Oracle documentation says date
implies both date and time.
I had this error today and discovered it was an incorrectly-formatted year...
select * from es_timeexpense where parsedate > to_date('12/3/2018', 'MM/dd/yyy')
Notice the year has only three 'y's. It should have 4.
Double-check your format.
What you're trying to insert is not a date, I think, but a string. You need to use to_date()
function, like this:
insert into table t1 (id, date_field) values (1, to_date('20.06.2013', 'dd.mm.yyyy'));
you need to alter session
you can try before insert
sql : alter session set nls_date_format = 'YYYY-MM-DD HH24:MI:SS'
Source: Stackoverflow.com