Re: rounding off

2003-11-22 Thread Daniel Kiss
Hi! Use the round() function. round(14.9564, 2) = 14.96 round(32.1123, 2) = 113.11 Bye > Hello, > > > I need the ability to round off dollar amounts to the nearest 100th > of a dollar amount, IE $14.9564 to $14.96 or $132.1123 to $113.11 > > can this be accomplished with MySQL SQL function ??

Re: rounding off

2003-11-22 Thread Mike Blezien
Thanks Paul. but I think the function I was looking for was ROUND(X,D), the TRUNCATE(X,D) just 'trims' it :) IE using the value 123.336 and I needed it to round off to 123.34 in this case. mysql> select truncate(123.336,2); +-+ | truncate(123.336,2) | +-

Re: rounding off

2003-11-22 Thread Paul DuBois
At 16:34 -0600 11/22/03, Mike Blezien wrote: Hello, I need the ability to round off dollar amounts to the nearest 100th of a dollar amount, IE $14.9564 to $14.96 or $132.1123 to $113.11 can this be accomplished with MySQL SQL function ?? Sounds like a job for TRUNCATE(). http://www.mysql.com/do