Adding time

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:

specci48

Well-Known Member
Licensed User
Longtime User
Hello Sascha K.,

a small example:

B4X:
   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
 
Top