Click here to Skip to main content
16,018,818 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, Im writing a simple parking lot project. What I need to do is to input a arrival time and a departing time, then the application should make calculations based on how munch time the car stayed on the parking lot.

My problem is that I don't know how to covert that timespan value to a integer value in order to make those operations. This what I done so far...



Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim final As String = TextBox4.Text
Dim inicial As String = TextBox3.Text
Dim tiempoI As TimeSpan = TimeSpan.Parse(inicial)
Dim tiempoF As TimeSpan = TimeSpan.Parse(final)
Dim resta As TimeSpan = tiempoF - tiempoI
TextBox5.Text = resta.ToString

End Sub
End Class

ANY HELP PLEASE?
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900