Truncate

Bruce Easton bruce at stn.com
Wed Dec 11 12:33:00 PST 2013


Ah - no, what I suggested initially won't work.

Maybe this (where aa="46949.5"):

rs(12,,0)=floor(aa / "100") * "100"


Bruce


On 12/11/13 3:12 PM, Bruce Easton wrote:
> I guess in two steps, where aa="46949.5":
>
> Then:  rs(8,.0)=aa / "100"
> Then:  fs(8,.0)=rs*"100"
>
> Bruce
>
>
>
> On 12/11/13 2:48 PM, Matt Sherrill wrote:
>> Ken,
>>        Thanks for your help - and sorry for taking so long to reply.
>> Your solution of:
>>
>> Result = 46949.500 - mod("46949.500","100")
>> Result = 46949.500 - 495
>> Result = 46454.5
>>
>> ... doesn't seem to work - unless I don't understand how MOD works?
>>
>> Let me try to restate my problem.
>>
>> If I have a calculated number of 46949.5, I need it to round the nearest hundreds "after" dropping the decimal.
>>
>> So the steps would proceed like this:
>> 1. 46,949.5 becomes 46,949
>> 2. 46,949 rounds to the nearest hundreds to become 46,900
>>
>> Thanks for your help!
>>
>> Matt Sherrill
>>
>>
>>
>>> ________________________________
>>> From: Kenneth Brody <kenbrody at spamcop.net>
>>> To: Matt Sherrill <mmsv45 at yahoo.com>; "filepro-list at lists.celestial.com" <filepro-list at lists.celestial.com>
>>> Sent: Tuesday, November 19, 2013 12:38 PM
>>> Subject: Re: Truncate
>>>
>>>
>>> On 11/19/2013 11:24 AM, Matt Sherrill wrote:
>>>> I’m sure this has come up before, but how do
>>>> you truncate the decimals without FilePro rounding the number?
>>>>
>>>> I have 46949.500 that I need to round to the
>>>> hundredth place (without the decimals).  So I want my result to
>>>> show "46,900", not "47,000" - which is what is happening now.
>>> Do you want it "without rounding the number" or "round to the hundredth place"?
>>>
>>> Assuming you mean that you want to "truncate" (to the "hundreds", not
>>> "hundredth"), as implied by your subject, so that "46999.999" becomes
>>> "46900" (your example would have the same result whether "truncate" or "round"):
>>>
>>>        result = number - mod(number,"100")
>>>
>>> If this is not what you meant, please post a better description of what you
>>>
>>> need.
>>>
>>> -- 
>>> Kenneth Brody
>>>
>>>
>>>
>>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20131211/95314985/attachment.html
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> Subscribe/Unsubscribe/Subscription Changes
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list




More information about the Filepro-list mailing list