I like to store the difference as integer not char(512)

db.define_table(
    'mytable',
    Field('begin_date', type='date', requires=IS_DATE(format='%Y.%m.%d.')),
    Field('end_date', type='date', requires=IS_DATE(format='%Y.%m.%d.')),
    Field('difference', compute=lambda r: r['end_date']-r['begin_date']))

begin_date =  2013.05.18
end_date    =  2013.05.27

i wanna get only 
                           difference: 9
                                      not: 9 days, 0:00:00
Anybody can help me?

-- 

--- 
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.


Reply via email to