Hi,
All the data that I retrieve from database contain 2 decimal, how can I convert it to 4 decimal? For example, one of the data retrieve from database is 172.28, but I would like to convert it to 4 decimal point which is 172.2800.
Code:double unitprice = Convert.ToDouble(dtLoop1.Tables[0].Rows[DetailRow1]["UnitPrice"].ToString()); decimal unitprice1 = 0.00m; unitprice1 = Convert.ToDecimal(unitprice); unitprice1 = (decimal)(unitprice);




Reply With Quote