Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#9275 closed Uncategorized (fixed)

ORA-01830 date format picture ends before converting entire input... admin

Reported by: hollerith Owned by: nobody
Component: Database layer (models, ORM) Version: 1.0
Severity: Normal Keywords: oracle date formats
Cc: Ian Kelly, Matt Boersma Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Doing: Porting a legacy application on Oracle 10g.
Symptom: The admin change interface reported this error on Datetimefields.
Solution:I found the 'works for me' at least was to alter the NLS_DATE_FORMAT in backend/oracle/ to include the time in the correct format to match django format (i.e. no fractions).

Attachments (2)

base.diff (186 bytes) - added by hollerith@… 10 years ago.
basic diff
base.2.diff (186 bytes) - added by hollerith <sp4me4ter@…> 10 years ago.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by hollerith@…

Attachment: base.diff added

basic diff

Changed 10 years ago by hollerith <sp4me4ter@…>

Attachment: base.2.diff added

comment:1 Changed 10 years ago by hollerith <sp4me4ter@…>

Both files are the same:



comment:2 Changed 10 years ago by Matt Boersma

Cc: Ian Kelly Matt Boersma added

comment:3 Changed 10 years ago by Ian Kelly

Resolution: fixed
Status: newclosed

(In [9780]) [1.0.X] Fixed #9275: Extended the Oracle date format to allow DATE columns to be used with DateTimeFields, especially when using legacy databases. Thanks to hollerith for the patch. Backport of [9779] from trunk.

comment:4 Changed 7 years ago by anurag.chourasia@…

Easy pickings: unset
Severity: Normal
Type: Uncategorized
UI/UX: unset

If the issue still persists and If the model field is a DateTimeField and the Database field is of DATE Type then you could try this to overcome this error

Look for the statement where you are updating the Date field. Over there, replace the microseonds to Zero and Oracle will start treating it gracefully.

For example, if you model field is called date_field

and if you are updating it as

then change it to

And that will solve the issue


Note: See TracTickets for help on using tickets.
Back to Top