MySQL Format() results as currency, yields strange results,
Posted: 14.10.2006, 22:58
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
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