Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3132

Re: Round Off Decimals

$
0
0

Hi All

 

Use the below code and it is so simple

 

For 2 decimal places

 

data(lv_round) = round(  val = '5678.65800341' dec = 2  ).


lv_round will be 5678.66


data(lv_round) = round(  val = '5678.65300341' dec = 2  ).


lv_round will be 5678.65


For 5 decimals


data(lv_round) = round(  val = '5678.65800741' dec = 5 ).


lv_round will be 5678.65801


data(lv_round) = round(  val = '5678.65800341' dec = 5 ).


lv_round will be 5678.65800


Thanks,

Murugan


Viewing all articles
Browse latest Browse all 3132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>