Rounding
Posted: Tue Jun 03, 2008 7:19 am
I do not know if I am being thick here but I am pretty sure there is an easy way of rounding the last 3 digits of a number based on the value of the last 4 numbers.
For example:
100023 rounds to 100500
100499 rounds to 100500
100500 rounds to 101000
100501 rounds to 101000
100523 rounds to 101000
I did think about using a substr on the last 3 numbers or something and then using round but I was hoping for something a bit more advanced but easier to read. If anybody could help there I would appreciate it.
For example:
100023 rounds to 100500
100499 rounds to 100500
100500 rounds to 101000
100501 rounds to 101000
100523 rounds to 101000
I did think about using a substr on the last 3 numbers or something and then using round but I was hoping for something a bit more advanced but easier to read. If anybody could help there I would appreciate it.