how to convert a float value in excel to round up value in SQl Query. i need to convert here the Basic Salary from float value into Round Up value(when passing to database).
string ins = "insert into PaySalary1(BasicSalary,HRA)values
('" + Convert.ToDecimal(dtExcel.Rows[i][0]) + "','" + dtExcel.Rows[i][1] + "')";
Sunny SharmaPosted Jul 1, 2013, 6:05 AM
You can use Math.Abs() to round up the decimal values, like:
---------------------------------------
Happy Coding :)
Mark it as answer if it helps you.
Cheers!