How to correctly set a future time?

mistermentality

Active Member
Licensed User
Longtime User
I am trying to add a user entered number of hours and minutes to the current time to get a future time that is that amount of time in the future.

I tried the following

B4X:
hours = numberofhours*DateTime.TicksPerHour
minutes = numberofminutes*DateTime.TicksPerMinute
total = hours + minutes
armset = DateTime.Now + total

so that I could call a service at the future time but the service always starts immediately, but as far as I know the code should work so any idea what I have done incorrectly?

Thanks.

Dave
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…