Yes, you can add hrs, minutes ans secs to a date or time. Here is a small example that adds 3 hrs plus to current time:
B4X:
'Example: Add 3 hrs 34 minutes 12 sec to current time
Dim p As Period
p.Seconds=12841
Dim NextTime As Long = DateUtils.AddPeriod(DateTime.Now, p)
Log(DateTime.time(NextTime))
Dim p As Period
p.Hours = 3
p.Minutes = 34
p.Seconds = 12
Dim NextTime As Long = DateUtils.AddPeriod(DateTime.Now, p)
Log(DateUtils.TicksToString(NextTime))
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.