tentavarious
asked on
converting string to timespan asp.net
Hello experts I have a value stored in a database as a string like so: hh:mm:ss for example 00:34:32 which is 34 minutes and 32 seconds. I need to convert this into a hours like so .5 hours. How can I accomplish this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
==========================
Dim myTime As DateTime = "#00:34:32#"
Dim myAltTime As String = CStr(Math.Round(CInt(myTim
Response.Write("myAltTime"
==========================
It should output "0.5 Hour(s)"