Home » SQL & PL/SQL » SQL & PL/SQL » How do I insert data and time into oracle with date datatype
How do I insert data and time into oracle with date datatype [message #2477] Fri, 19 July 2002 05:23 Go to next message
Mitesh
Messages: 7
Registered: July 2002
Junior Member
I am trying to insert the data and time into a date field through SQLPlus. But it gives me the following error:

ORA-01830: date format picture ends before converting entire input string

This is my insert statement:
insert into test10 values(23, 'VJ', '11-Jul-2002 21:21:21')
Here the third values is going to a date datatype.

Any clues...?

TIA
Mitesh
Re: How do I insert data and time into oracle with date datatype [message #2489 is a reply to message #2477] Fri, 19 July 2002 10:30 Go to previous message
ctg
Messages: 146
Registered: July 2002
Senior Member
whats your default date format?
(select sysdate from dual;)

try:
INSERT INTO test10
VALUES(23, 'VJ',TO_DATE('11-JUL-2002 21:21:21','DD-Mon-YYYY HH24:MI:SS'));
Previous Topic: function based index
Next Topic: Retrieving an entire table row for row?
Goto Forum:
  


Current Time: Tue Apr 23 12:25:07 CDT 2024