M mistermentality Active Member Licensed User Longtime User Apr 21, 2011 #1 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 Code: 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
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 Code: 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
Erel B4X founder Staff member Licensed User Longtime User Apr 21, 2011 #2 How did you declare the variables? They should be declared as Long. Upvote 0
M mistermentality Active Member Licensed User Longtime User Apr 21, 2011 #3 My mistake, one was not a long variable Thanks. Dave Upvote 0