I am using a gridview in this i am taking a lable under a template field which code is this
<asp:Label ID="Label14" runat="server" Text='<%# Eval("Arrival_Time") %>' >asp:Label>
but according to data base it shows the result in the form 24.989777676634 but i want
in the form 24:94 how can i perform to this one. plz
Loading
Andrew FensterPosted Aug 19, 2010, 9:08 PM
I keep this site bookmarked: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx. It has all the date formatting rules.
Note, HH:mm gives you hours and minutes. Hours go from 0 to 23. Minutes go from 0 to 59. You wanted the form 24:94. I'm not really sure what that means. The link I gave you has all the formatting rules, so you can find the format you want.
Good luck to you.
vipin sainiPosted Aug 19, 2010, 2:56 AM
Bhilendra YedePosted Aug 19, 2010, 2:52 AM
We can format a number as per requirement of decimal place. For example we want the number should display two decimal places only.
System.Math.Round(5.768,2) will return 5.77