How do I round a number of 2 decimals?

studio
variable

#1

At the moment I am trying to get rounded values (2 decimals) from Excel with the robot, but if I paste the values it does not round up or down. I just get the two last decimals.

Does somebody know what to do?


#2

newValue = math.Round(oldValue,2) //// (2 - represents the number of decimals)


#3

I did try this, but the value will not convert to a Double. Wich makes it impossible to round in UI Path


#4

You can always convert a variable to double by using Cdbl(xxx)


#5

It works, thanks a lot