Re: [web2py] use of 'timedelta' as a field

2010-12-21 Thread ron_m
timediff is just 3 integers representing days, seconds, microseconds so you could decompose it and store it as 3 int fields in the DB and then use the 3 int values in a constructor to get it back. Alternative would be to convert it to a float or double if you can accept rounding errors.

Re: [web2py] use of 'timedelta' as a field

2010-12-21 Thread Sahil Arora
like SQLField('actual_time','timedelta') which is certainly not correct as it is giving error. Is there any other alternative so that i can do addition with actual_time . On Wed, Dec 22, 2010 at 11:16 AM, Sahil Arora wrote: > Can I define a table with a field of type 'timedelta' in database. > I

[web2py] use of 'timedelta' as a field

2010-12-21 Thread Sahil Arora
Can I define a table with a field of type 'timedelta' in database. I have to do some calculations of time using timedelta.