Problem: When I send a recordset to a grid that contains a datetime field,
I get the following error:
<type 'exceptions.ValueError'> invalid literal for int() with base 10: '16
04:59:22'
The field is defined as:
Field('last_updated', 'datetime')
The current datetime is written to the field with the following function:
last_updated=datetime.datetime.utcnow()
Looking in sqlite directly, I see the following value:
2014-02-16 04:59:22
However, when I try to load the grid with that value in the column, I get
the above error. If I empty the field to "" and reload the grid, it loads
fine.
Could someone point me in the right direction for working with datetimes in
web2py... The proper way to store, retrieve them. Also, if the value I
supplied above is invalid, why was it accepted by web2py's DAL?
Many thanks in advance
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.