Hey all,
I need some help converting a value from in a textbox where a value is entered as 1:30 into an integer that is in the number of minutes.
I have a web form that has textbox called TextBoxDuration. When the user clicks on ButtonSubmit, I need to convert the value of TextBoxDuration.Text into minutes to IntegerFlighthours so that I can save the value in my SQL database.
To clarify:
Protected Sub ButtonSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonSubmit.Click
Dim integerFlightHours As Integer
integerFlightHours = CInt(CDbl(TextBoxDuration.Text) * 60)
LabelMinutes.Text = CStr(integerFlightHours)
End Sub
When I run this, I get Conversion from string "1:30" to type 'Double' is not valid. This obviously has to do with t ...
Go to the complete details ...