How to separate Fraction and Digit from Number in axapta.




static void Job20(Args _args)
{
qty t=47.50;
 str _amount = strFmt("%1",num2str(t,0,1,0,0));
 boolean decimals;
   TextBuffer txtAmount = new TextBuffer();
    txtAmount.setText(_amount);
    if (txtAmount.find("^[0-9]+$")) // Regular expression inside the find method
   {
     decimals = true;
   }
   info(strFmt("%1 -- %2",trunc(t),frac(t)));
}

Comments

Popular Posts