>
> I like to store the difference as integer not char(512)
>
I guess the output of the compute function is a timedelta object (since you
are operating with date objects), which has a .days attribute. You can use
the .days attribute instead:
compute=lambda r: (r['end_date']-r['begin_date']).days
For integer fields, you must pass the field type argument explicitly with
Field("fieldname", "integer", ...)
--
---
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.