marshallgrad
08-21-2007, 11:30 PM
Hey gang,
I need a little help with a Date/Time issue. More specifically a time issue. I know I could do what I want using a bunch of if/then statements, but wanted to see if there was a better way to do it.
I am using a very basic approach to extracting the current computer time.
mytime=formatdatetime(now,4)
This returns the current computer time in the format of HH:MM;
example
================
02:41
12:37
23:59
I want to generate a random number between 1-11 (which I know how to do already) and add it to the above time to come up with a new time. Can someone provide some guidance as to whether there is a function or statement that accomplishes this task? If there is no function or statement, can you give some advice on how to code for this hopefully in a way that is shorter than my beginner experience level permits me to do currently.
Thanks in advance,
Butch
I need a little help with a Date/Time issue. More specifically a time issue. I know I could do what I want using a bunch of if/then statements, but wanted to see if there was a better way to do it.
I am using a very basic approach to extracting the current computer time.
mytime=formatdatetime(now,4)
This returns the current computer time in the format of HH:MM;
example
================
02:41
12:37
23:59
I want to generate a random number between 1-11 (which I know how to do already) and add it to the above time to come up with a new time. Can someone provide some guidance as to whether there is a function or statement that accomplishes this task? If there is no function or statement, can you give some advice on how to code for this hopefully in a way that is shorter than my beginner experience level permits me to do currently.
Thanks in advance,
Butch