sql.py  line 2153
          elif field.type == 'datetime' and value != None\
                and not isinstance(value, datetime.datetime):
               (y, m, d) = [int(x) for x in
                            str(value)[:10].strip().split('-')]
               time_items = [int(x) for x in
                             str(value)[11:19].strip().split(':')[:
3]]

if value =2009-1-1 1:12:2 sqlite3 error:

 File "/home/liugehao/web2py/gluon/sql.py", line 2158, in __getitem__
   str(value)[11:19].strip().split(':')[:3]]
ValueError: invalid literal for int() with base 10: ''

can it  changed like this?

          elif field.type == 'datetime' and value != None\
                and not isinstance(value, datetime.datetime):
(y, m, d) = [int(x) for x in
                            str(value).split(' ')[0].split('-')]
               time_items = [int(x) for x in
                             str(value).split(' ')[1].split(':')[:3]]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to