Avtar Singh

Truncate a Real to 2 decimal places

Discussion created by Avtar Singh on May 11, 2009
Latest reply on May 12, 2009 by Rajesh Uchakavil

Hi

 

I want to turncate a decimal to 2 decimal places. I am using Blaze Advisor 6.5

 

When using the truncate function in the Blaze Advisor tool, it gives me an error:

 

 Error: The 'Java:com.blazesoft.engines.rules.NdDefBuiltIns' class does not have any matching 'truncate' method.
There is no method with the name 'truncate' that accepts 2 parameters.

 

Blaze has a method called truncate which would only the decimal part but nothing like truncating the decimal to 2 places or something like that. 

 

 

Example:

 

num is a real initially 12.944444;

num=truncate(num,2);

 

What I want is 12.94 only

 

Can someone plz help me on this?

 

Thanks in advance!

 

 

Avtar

avtarxing@gmail.com

Outcomes