Rounding up to the next 100

N

noydb

If one has a floating number as a string, is there a spiffy way to
round that string-number UP to the nearest 100?

XstrNmbr = 3579.127893 -- would want to round that to 3600.

Thanks for any help!
 
A

Arnaud Delobelle

noydb said:
If one has a floating number as a string, is there a spiffy way to
round that string-number UP to the nearest 100?

XstrNmbr = 3579.127893 -- would want to round that to 3600.

Thanks for any help!

HTH
 
F

Florian Diesch

noydb said:
If one has a floating number as a string, is there a spiffy way to
round that string-number UP to the nearest 100?

XstrNmbr = 3579.127893 -- would want to round that to 3600.

math.ceil(3579.127893/100)*100


Florian
 
M

Michael.Coll-Barth

From: Arnaud Delobelle



I meant

Ah, then you will need to cast it first.
3600.0



The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
product doctrine and thus protected from disclosure. If the reader
of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by replying to this message and deleting it and all
copies and backups thereof. Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top