Convert time to decimals in .net
- by henrico
Is there an easy way to present time (hh:mm) as a decimal value?
Example, 01:08 should become 1,13.
I have an asp:textbox masked (ajax) as time with the mask format "99:99". Next to this box I need to present the entered value as decimal.
<asp:TextBox ID="time" runat="server" /> hh:mm ([time in decimal format])
<ajaxToolkit:MaskedEditExtender runat="server" Mask="99:99" TargetControlID="time" MaskType="Time" />