Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Error inserting date with time

Posted on 2001-06-08
3
Medium Priority
?
490 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious sideā€¦
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
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 how to recover a database from a user managed backup

604 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