i am using mssql,
my table columns
presented hours (float)
total hours (float)
percentage (float)
percentage displays 72.222267
how to display only 72.22
which data type to use?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.


String.Format("{0:0.00}", 72.222267); // "72.22"
double d =72.222267;
string s = d.ToString("F2");
Output: 72.22

FLOAT(4,2) as data type for percentage as PRECISION(4) and scale(2)
Sourabh SomaniPosted Apr 14, 2017, 1:16 AM