Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Round or Floor or Ceiling

I am trying a number of combinations in order to get to "the next highest number starting with 0" from a particular integer.

I’ve tried ROUND, CEILING and FLOOR and I can not get any of them to work.

Examples.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

17 = 20
11 = 20
204 = 210
1001 = 1010
107 = 110

So basically any value should then return the next 0 valued number AFTER it.

Any help would be greatly appreciated. Thanks

>Solution :

assuming all is int’s then you can divide and multiply with 10 to do it

(@i+10)/10*10
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading