How was the Following Value calculated

Answered How was the Following Value calculated

  • Wednesday, March 06, 2013 3:12 PM
     
      Has Code
    Good Day 

    i have a RadMaskedTextBox which gets binded with the following value from the DB 

       
    <telerik:RadMaskedTextBox IsEnabled="False" Height="22" HorizontalAlignment="Right"    Mask="p1" MaskType="Numeric" MaskedText="0" EmptyContent="0" Margin="0,281,880,0" Name="RETURNONASSETS" telerik:StyleManager.Theme="Metro" VerticalAlignment="Top" Width="227" TabIndex="8" SelectionOnFocus="SelectAll" Grid.Column="1" /> 


    <b>0.0473445085040537 </b>

    and on the application it format the value as 

     
    [CODE]4.7 %[/CODE] 



    which is Correct , now i want to understand how did it come to 4.7 , i tried this 

     
      select round(0.0473445085040537,2)
    
       select  round(0.0473445085040537,3)  




    but my calc here does not give me 4.7 , i need help with this TSQL to make it 4.7


    Vuyiswa Maseko


All Replies

  • Wednesday, March 06, 2013 3:17 PM
     
     Answered Has Code
     
    select  round(0.0473445085040537,3) *100 


    Chuck Pedretti | Magenic – North Region | magenic.com

    • Marked As Answer by Vuyiswa Maseko Wednesday, March 06, 2013 3:19 PM
    •  
  • Wednesday, March 06, 2013 3:19 PM
     
     
    Thanks :)  

    Vuyiswa Maseko

  • Wednesday, March 06, 2013 3:22 PM
     
     

    Hello ,

       I think the UI is converting the value into percentage as like in Excel. When i pasted the same value in the excel and formated to the cell to percentage it gave the value of 4.73 %. May be you have to check some property of the textbox in the application.


    Best Regards Sorna

  • Wednesday, March 06, 2013 4:13 PM
     
     

    Yes , you re right, it is converting like Excel, i i wrote this app sometime ago from , converting it form Excel to a SL app. So i made sure all the calculations are the same. now i am displaying the values in Excel , and i saw some discrepancies. 


    Vuyiswa Maseko