Reputation: 21
Im trying to round a decimal that is currently 4 places into two but rounding up always.
As an example 0.2407 should round to 0.25. Is there a way to do this? Ceil is integer only and round(x,0.01) returns 0.24 as expected.
Upvotes: 1
Views: 1091
Reputation: 269
One of the solution could be:
y = ceil (x*100) / 100;
Example:
data a;
x = 0.2407;
y = ceil (x*100) / 100;
put x= y=;
run;
Log:
x=0.2407 y=0.25
Upvotes: 3