From: | Frank Bax <fbax(at)sympatico(dot)ca> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: rounding down a number |
Date: | 2007-03-30 22:40:34 |
Message-ID: | 5.2.1.1.0.20070330183617.04f49a50@pop6.sympatico.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
100.51 will become 100.41 and round down to 100 - Are all input only one
decimal place?
At 05:56 PM 3/30/07, Phillip Smith wrote:
>Subtract .1 from the number before rounding it when you want it to round
>that way...
>
>100.5 will become 100.4 and round down.
>100.6 will become 100.5 and round up.
>Everything else will round as 'normal'.
>
>~p
>
>
>On Fri, 2007-03-30 at 14:38 -0700, Michael wrote:
>>Hi,
>>
>>I'm trying to round down any number with a half, but keep the round
>>function for all other fractions.
>>For example
>>
>>100.1 becomes 100
>>100.4 becomes 100
>>100.5 becomes 100 (this one would ordinarily round to 101)
>>100.6 becomes 101
>>100.9 becomes 101
>>
>>Thanks, Mick
From | Date | Subject | |
---|---|---|---|
Next Message | Duncan Garland | 2007-03-31 09:51:13 | Re: rounding down a number |
Previous Message | Jim Stalewski | 2007-03-30 22:30:15 | Re: rounding down a number |