I know that
Code: Select all
let>bl=1971-03-22
add>bl,10
But what about time?
I have tried
let>bl=10:55
add>bl,10
But this gives me an error.
What is the easiest way to add and subtract minutes from a certain time?
Thanks!
Moderators: JRL, Dorian (MJT support)
Code: Select all
let>bl=1971-03-22
add>bl,10
Code: Select all
//Let>nowshutdown=14:45
//let>addition=18
Separate>nowshutdown,:,time
let>hours=time_1*60
let>totaltime=hours+time_2
let>newtime=totaltime+addition
let>hours={int(%newtime%/60)}
Let>minutes={int((frac((%newtime%/60)-%hours%))*60)}
Code: Select all
VBSTART
VBEND
//add ten minutes to current time
VBEval>DateAdd("n",10,now),new_time
//or add 60 minutes to specific time
VBEval>DateAdd("n",60,"18:30"),new_time
//Get out Hour, Min, Sec portions
VBEval>Hour("%new_time%"),hour
VBEval>Minute("%new_time%"),min
VBEval>Second("%new_time%"),sec