S Sascha K. Member Licensed User Mar 23, 2008 #1 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
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.
specci48 Well-Known Member Licensed User Longtime User Mar 23, 2008 #2 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
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
Erel B4X founder Staff member Licensed User Longtime User Mar 23, 2008 #3 I recommend you to read the Date & Time tutorial: http://www.b4x.com/forum/showthread.php?t=894
S Sascha K. Member Licensed User Mar 23, 2008 #4 Ok, I´ve found a solution. Thanks for your fast help. :sign0060: