Android Question Time Calculation for work

deyan666

Member
Licensed User
Longtime User
hey guys so im trying to calculate the difference in two times. A sign on and a sign off.

Im using this formula and it works but not entirely the way i want:
Dim rsoff As Long = DateTime.TimeParse(EditText3.Text)
Dim asoff As Long = DateTime.TimeParse(EditText4.Text)
EditText6.Text = DateUtils.PeriodBetween(rsoff, rson)


question 1: how do i get the result of the difference to be a time. and not years = - months = 0 days = 0 hours = 8 min = 0 etc etc

question 2: sometimes ill sign on friday night and finish saturday morning. how can i code that to have the friday portion as one variable and saturday portion as another?

been working on this about 6 months still cant get it right
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

deyan666

Member
Licensed User
Longtime User
Upvote 0
Top