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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA-01830 error trying to pull a date. 1

Status
Not open for further replies.

bigracefan

Programmer
Apr 2, 2002
304
US
Here is my query:

select * from ecu_prod_detail where
pcb_serial_number = 9000145411 and
step_machine = 10003 and
prod_date_time = to_date('9-7-2001 5:46:16 PM', 'mm/dd/YYYY hh24:mi:ss')

and here is the error message:

ERROR at line 4:
ORA-01830: date format picture ends before converting entire input string


Any idea why I'm getting this error. The date format looks like it'll work on an insert.

Thanks.

Pete
 
You need:
Code:
'mm/dd/YYYY hh:mi:ss pm'

Code:
select * from Life where Brain is not null
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
When posting code, please use TGML to help readability. Thanks!
 
Or lose the PM in your date string (assumes hours are 00-23) and keep hour HH24 format.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top