Android Question Time Calculation for work

Discussion in 'Android Questions' started by deyan666, Jul 7, 2015.

  1. deyan666

    deyan666 Member Licensed 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
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. deyan666

    deyan666 Member Licensed User

    Thanks Erel ill give it a shot!
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice