Convert time to decimals in .net

Posted by henrico on Stack Overflow See other posts from Stack Overflow or by henrico
Published on 2010-05-05T12:01:21Z Indexed on 2010/05/05 12:28 UTC
Read the original article Hit count: 492

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" />

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about maskededitextender