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.

FLOAT(4,2) as data type for percentage as PRECISION(4) and scale(2)
String.Format("{0:0.00}", 72.222267); // "72.22"
double d = 72.222267;
string s = d.ToString("F2");
Output: 72.22
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sourabh SomaniRank #37 · 35.5K reputationPosted Apr 13, 2017, 9:16 PM EDT