List:General Discussion« Previous MessageNext Message »
From:Richard Davies Date:January 12 2004 10:37pm
Subject:Re: Rounding to nearest one sixteenth of an inch. (Solved)
View as plain text  
On Monday 12 Jan 2004 22:23, you wrote:
> Richard Davies wrote:
> > Does anyone have any ideas on how to round a number in the form
> > float(3,4) to the nearest sixteenth of an inch.
>
> Multiply by 16, round, divide by 16.

Obvious really,
update table1 set field1 = (round(field1 * 16)/16);

I was looking for the hard answer and not finding it.

Thank you.

-- 
Regards

Richard

Thread
Re: Rounding to nearest one sixteenth of an inch. (Solved)Richard Davies12 Jan