Error inserting date with time

I am getting error
ORA-1830 date format picture ends before converting entire input string

while trying to insert:

insert into ABC
(ABCDate)
values('03-JUN-1996 12:25:19 AM');

Isn't it a correct datetime format ?
It works if I use TO_DATE, but do I have to?
graywolf1988Asked:
Who is Participating?
 
ddaConnect With a Mentor Commented:
You can do "alter session set nls_date_format='DD-MON-YYYY HH12:MI:SS AM" before your insert statements, and this will allow you to use your date formatr without to_date().
0
 
jammalkCommented:
Yes, you have to use the TO_DATE function to let the Oracle know what format you are presenting the date in, if it is other than the default, MM-DD-YYYY.
0
 
jammalkCommented:
Sorry. The usual default date format is DD-MON-YYYY & also it depends on the database settings too.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.