27-07-18, 11:06 PM
تم اجراء الحل بس يمكن في شئ افضل
Dim MyDateTime As DateTime = Nothing
Dim MyTimeSpan As New TimeSpan
Dim a As Integer = 0
Dim a1 As Integer = 0
Dim x As Integer = 0
For Each S As String In ListBox1.Items
MyDateTime = DateTime.Parse(S)
MyTimeSpan = MyTimeSpan.Add(New TimeSpan(MyDateTime.Hour, MyDateTime.Minute, 0))
a += MyDateTime.Hour
Next
a1 = (a - MyDateTime.Hour) / 24
If (MyTimeSpan.Minutes) < 10 Then
TextBox1.Text = a1 & " / " & MyTimeSpan.Hours & ":" & "0" & MyTimeSpan.Minutes
Else
TextBox1.Text = a1 & " / " & MyTimeSpan.Hours & ":" & MyTimeSpan.Minutes
End If
