Hello web2py users,
I defined a table with one of the fields as datetime type, and when I
try to insert a raw it fails with this

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

with a raw query looking like this

INSERT INTO vals(timestamp, value, type, number) VALUES ('2009-09-07
12:00:00', 24, 11, 1);

which works with a MySQL backend.
Googling a bit it turns out its a problem of datetime conversion in
oracle.
Im still investingating about this, but what I get so far is the
default Oracle DATE format is something weird (kind of YYYY-MM-DD, no
hour and so).
To fix the problem you can either do this to change it to our (python
datetime) format

alter session set NLS_DATE_FORMAT='<my_format>';

but this lasts just for this session, or use something like

INSERT INTO vals(timestamp, value, type, number) VALUES (to_date
('2009-09-07 12:00:00', 'yyyy-mm-dd hh:mi:ss'), 24, 11, 1);

using the to_date() oracle function.

I did not yet try anything of this solutions, and anyway I guess we
need a web2py fix.. any other hint ?

Thanks,

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to