For 2 decimal precision, you can try, "{:.2f}".format(your_value)
On Thursday, February 13, 2014 6:49:44 AM UTC-5, Robin Manoli wrote: > > Hey, > I have a decimal in db, for which I tried numerous ways to round to two > decimal points, and also to calculate with other numbers. Basically I want > to convert it to a float, but could find no way to do so. Nor could I > convert it to string, or make any other number a decimal. Please help! > -- 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/groups/opt_out.