Page 1 of 1

MySQL Format() results as currency, yields strange results,

Posted: 14.10.2006, 22:58
by mparak
Dear Friends,

I often need to display a MySQL calculated field in a DbGrid and find that if I use the Format(calculated_field, decimal_places) thingy I get the results as a string and often the thousand separator of comma causes the thousands to be lost.
I solve this by implicitly setting the display property of the columns, and set the thousand separator to something other than a comma, but hope that there is a more graceful solution.


Warmest Regards

M.Parak







http://www.cad.co.za/index.html

Posted: 03.12.2008, 07:33
by mparak
In answer to a question that was posed by myself a long time ago, I have found that the round(field,n) has much more pleasant results.