How to convert decimal ?
-
HI guys i am facing problem, in my application i am using data type decimal, when i get the value from data base and show in text box if the value is e.g. 99 it shows 99.00000 as i have specified 5 after precision in sql server, how can i convert the 99.00000 to 99 can any one let me know about it thankx in advance.
-
HI guys i am facing problem, in my application i am using data type decimal, when i get the value from data base and show in text box if the value is e.g. 99 it shows 99.00000 as i have specified 5 after precision in sql server, how can i convert the 99.00000 to 99 can any one let me know about it thankx in advance.
Convert.ToInt32(DecimalValue) or lblValue.Text = decimalValue.ToString("#,#0"); or txtValueBox.Text = decimalValue.ToString("#,#0");
-
Convert.ToInt32(DecimalValue) or lblValue.Text = decimalValue.ToString("#,#0"); or txtValueBox.Text = decimalValue.ToString("#,#0");
-
thansk for your answer but in case if there is 99.45 in database it converts it back to 99 in this case i want to show 99.4, kindly reply ASAP.
-
thanks for your answer but in case if there is 99.45 in database it converts it back to 99 in this case i want to show 99.45, kindly reply ASAP.
"#,#0.##"
-
thanks for your answer but in case if there is 99.45 in database it converts it back to 99 in this case i want to show 99.45, kindly reply ASAP.