What database? Web2py has a decimal datatype which, in my use cases, mimics the Python decimal datatype. I use Postgresql and the adapter turns Python decimal into Postgres numeric. Both of these types act like real world decimal numbers. In other words, .2 + .1 comes out to .3. Of course a different db backend will work differently.
Just google python decimal. On Friday, July 11, 2014 5:50:30 AM UTC-4, Stefan van den Eertwegh wrote: > > Hi, > > I have a float type in the define tables and when he inserts 3.50 into the > database he makes 4.0 off it. > How comes that it rounds off the float? And not uses the usage of 2 > decimals? > > Thank you! > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.