Adding time

Discussion in 'Questions (Windows Mobile)' started by Sascha K., Mar 23, 2008.

  1. Sascha K.

    Sascha K. Member Licensed User

    Hello,

    How can I add a lot of different time-values?

    Example:
    Day.............from.......until..........difference
    Monday,.......08:00h - 17:00h --> 09:00h
    Tuesday,......08:30h - 16:30h --> 08:00h
    Wednesday,..08:00h - 17:30h --> 09:30h
    --------------------------------------------
    ..........................................26:30h

    When I use TimeParse to change TIME into TICKS, there is a problem after 24h.
    Next add only adds the value to 00:00h.
     
    Last edited: Mar 23, 2008
  2. specci48

    specci48 Well-Known Member Licensed User

    Hello Sascha K.,

    a small example:

    Code:
    a = TimeParse("23:00") - TimeParse ("02:00")
       b = TimeParse(
    "21:00") - TimeParse ("04:30")
       c = a + b
       d = c 
    Mod cTicksPerHour
       Label1.Text = (c - d) / cTicksPerHour & 
    ":" & d / cTicksPerMinute

    specci48
     
  3. Erel

    Erel Administrator Staff Member Licensed User

  4. Sascha K.

    Sascha K. Member Licensed User

    Ok, I´ve found a solution.

    Thanks for your fast help.
    :sign0060:
     
Loading...
  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