Call now: 919-335-6342  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 








ORA-01840: input value not long enough for date format tips

Oracle Error Tips

by Donald Burleson (S. Karam)


The Oracle docs note this on the ora-01840 error:

ORA-01840 input value not long enough for date format
Cause: The data to be converted to date format was incomplete; the date format picture was longer than the input data.
Action: Either add more input or shorten the date picture format, then retry the operation.

On Oracle MOSC, ORA-01810 was being exemplified as being thrown, "When Creating a Window or Schedule with DBMS_SCHEDULER" while using Oracle Enterprise Edition - Version: and can happen on any platform. 

You are attempting to create a window or a schedule using the package DBMS_SCHEDULER, such as in the following example:

dbms_scheduler.create_schedule (
schedule_name => 'nightly_schedule',
start_date => '01-JAN-2004 01:00:00',
end_date => '01-JAN-2005 01:00:00',
repeat_interval => 'FREQ=DAILY; INTERVAL=1',
comments => 'Important Comments Here');

However, it fails with the following stack:

ORA-01840: input value not long enough for date format
ORA-06512: at line 2

You check the NLS_DATE_FORMAT, and it is, indeed, set to DD-MON-YYYY HH24:MI:SS.
DBMS_SCHEDULER requires the hours in a 12 hour, AM/PM model.
Change the code to use a 12 hour format instead of 24 hour. This does not require a change in the NLS_DATE_FORMAT:

dbms_scheduler.create_schedule (
schedule_name => 'nightly_schedule',
start_date => '01-JAN-2004 01:00:00AM', <--- Note the 'AM' Here
end_date => '01-JAN-2005 01:00:00AM', <-- Note the 'AM' Here
repeat_interval => 'FREQ=DAILY; INTERVAL=1',
comments => 'Important Comments Here');

It is important to note that MOSC finishes this information with this statement: "This is true for all date strings passed to dbms_scheduler for create schedule, window, or job. Even if your date format is, say, DD-MON-RR, you still need to use the format above." 



Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals. 

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Please  e-mail:  

and include the URL for the page.



Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2023

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.



Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster