Do you know the difference is more than 1day? The problem is that a time
difference is an object which has days and seconds attributes.
try this:
def tdiff(r):
print *r['check_in.created_on']*
delta = *(request.now-r['check_in.created_on']*)
print delta
return delta.days+float(delta.seconds)/24/3600
...
Field('duration', 'double', *compute=tdiff*)
....
Does it print anything? Is tdiff called?
On Friday, 29 March 2013 18:59:51 UTC-5, 黄祥 wrote:
>
> i've tried both of it but the result is 0. any idea about this?
>
> thank you so much
>
--
---
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.