var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: rounding up to .5 from 4 decimal places
I have data with 4 decimal places that need to be rounded up to the nearest .5 in a query.
1.0222 = 1.5
-.2345 = 0
349.6793 = 350.0
The way i did it in '97 is too complex for 2000. At least that is what the message error tells me. I have a feeling i wasn't doing it too efficiently to begin with.
Can you please help me?
Re: rounding up to .5 from 4 decimal places
just take the decimal part of the number,
if decimal part is < .5 than add .5 to integer part of the number
if decial part is > .5 than add 1 to integer part of the number
Rounding to 4 digits
yourRoundendNum = (Int((yourNum + 0.0005) * 1000) / 1000)
Thanks...i'll shall try both methods!
pulling decimals from whole numbers in a query
I am trying to isolate the decimal portion of a number from its whole number in a query.
I thought of MID, but the decimal point is not always at a fixed point
I want .6333 from 78.6333
.5 from 489.5
Any help would be appreciated. Thanks.
VAr1 = 78.6333 (assuming it is a string)
Var2 = Mid(Var1,instr(var1,1,".")+1)
var2 is now equal to .6333
thanks...this is really helping me cut some baby steps.