Help with Decimal Roundings [Resolved]

Posted by Vuyiswamb under Sql Server on 8/12/2012 | Points: 10 | Views : 814 | Status : [Member] [MVP] [Administrator] | Replies : 3
hi Guys , i am a bit stuck here

i have this value "0.833333333333333"

and i want the asnwer to be 83 , i tried this



SELECT ROUND(0.833333333333333,2)


but it does not work

Thank you for posting at Dotnetfunda
[Administrator]



Responses

Posted by: Pandians on: 8/12/2012 [Member] [MVP] Silver | Points: 50

Up
0
Down

Resolved
Pls try this
select Cast(0.833333333333333 * 100 AS INT)


Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shijohnjoseph on: 8/12/2012 [Member] Starter | Points: 50

Up
0
Down

Resolved
double Temp = 0.833333333333333;

label1.Text= decimal.Round(Convert.ToDecimal(Temp), 2).ToString();

i cant understand where your using this if application means use this or specify where your using this !..

"Personality has the power to open many doors, but character must keep them open"

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 8/12/2012 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
thanks it worked

Thank you for posting at Dotnetfunda
[Administrator]

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response