Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date in Oracle 8i

Status
Not open for further replies.

shyamal

Programmer
Aug 14, 2000
79
US
The following insert generates this error:

INSERT INTO DEV.SLEONTPS (NVARCHAR,FLDDATE1) VALUES ('THIS','01/01/2001');

Error:
INSERT INTO DEV.SLEONTPS (NVARCHAR,FLDDATE1) VALUES ('THIS','01-01-2001')
*
ERROR at line 1:
ORA-01843: not a valid month

How are dates entered in an insert statement I thought I was using the standard date format, my datatype for the column is date.

Thanks in advance.
 
Oops, shoulda been:

INSERT INTO DEV.SLEONTPS (NVARCHAR,FLDDATE1)
VALUES ('THIS', TO_DATE('01-01-2001', 'MM-DD-YYYY'));

I had dashes, you had slashes


John Hoarty
jhoarty@quickestore.com
 
Or
INSERT INTO DEV.SLEONTPS (NVARCHAR,FLDDATE1)
VALUES ('THIS', TO_DATE('01/01/2001', 'MM/DD/YYYY'));
if you want to use slashes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top