forum

Home / DeveloperSection / Forums / how to round decimal value in Gridview

how to round decimal value in Gridview

Anonymous User 2075 20-Nov-2014

I am trying to round the result of my code to 2 decimal places, but ROUND isn't working. Any help? Thanks!

<asp:SqlDataSource ID="SqlDataSource1"runat="server" 
     ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
     SelectCommand="SELECT [Id], [attempts], [total], (round(attempts / total,(2))) AS [Percentage] FROM [Game]">
</asp:SqlDataSource>

Updated on 20-Nov-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By