Click here to Skip to main content
15,902,114 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I am performing following insert operation in oracle which gives me date error..

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




insert into VISITOR_REG ( VISITOR_NAME,MOBILE_NO,COMPANY,PURPOSE,BRANCH_ID,DEPARTMENT,CONTACT_PERSON,CITY,VISIT_DATE,ENTRY_PERSON,EXIT_PERSON,STATUS,LUGGAGE ) values ('Darshin',9987854533,'web development','website development','B0001','C10001','E00001','Ahmedabad','04-MAY-11 10:09:59 PM','','','Pending','Laptop')


help if anybody knows the solution...
Posted

As you are entering a date here, consider using the to_date function. This would change the date portion of your code here to
SQL
to_date('04-MAY-11 10:09:59 PM', 'DD-MON-YY HH:MI:SS PM')
 
Share this answer
 
Your NLS_DATE_FORMAT does not match your date string. you need to alter NLS_DATE_FORMAT, or use the to_date function:
http://www.techonthenet.com/oracle/functions/to_date.php[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900