[Zope] ZSQL Method's Precision

Gabriel Genellina gagsl-zope at yahoo.com.ar
Tue Oct 24 00:32:01 EDT 2006

At Tuesday 24/10/2006 01:05, Jason C. Leach wrote:

>In a PostgreSQL DB I have a Numeric data type with a precision of two
>decimal places. If I have 1.33 in as the result from my query, it's
>everything is good. However, if I have 1.30 it reduces the precision
>to one decimal place and I get 1.3. Not so good when dealing with
>currency ( I don't want to use the money data dype ).
>Any ideas on how I can get my ZSQL method to keep two decimal places?

I assume you get a float type from the DB.
1.30 *prints* as 1.3 but has around 12 decimal digits of precision.

Gabriel Genellina
Softlab SRL 

Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

More information about the Zope mailing list