?
Solved

Error inserting date with time

Posted on 2001-06-08
3
Medium Priority
?
489 Views
Last Modified: 2008-03-17
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?
0
Comment
Question by:graywolf1988
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:jammalk
ID: 6169042
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
 
LVL 2

Expert Comment

by:jammalk
ID: 6169065
Sorry. The usual default date format is DD-MON-YYYY & also it depends on the database settings too.
0
 
LVL 4

Accepted Solution

by:
dda earned 400 total points
ID: 6169227
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question