Hello all, can anyone please help me by teaching me how to subtract two different time, let's say i start something at 10:05 and it finishes at 10:15, how can i subtract this two times? anyone?
If I may enhance the code provided by Mahares, I converted it to a function:
B4X:
Sub GetDifference(dDateStart As String, dTimeStart As String, dDateEnd As String, dTimeEnd As String) As Double
Dim DateStart, DateEnd, TimeDiff As Long
DateStart = DateTime.DateParse(dDateStart) + DateTime.TimeParse(dTimeStart)
DateEnd = DateTime.DateParse(dDateEnd) + DateTime.TimeParse(dTimeEnd)
TimeDiff = DateEnd - DateStart
Return TimeDiff / 1000 / 60
End Sub