17
« on: September 16, 2017, 07:37:16 AM »
sub time
set %AMPM AM
set %d1 %1 / 1 % 10
set %d2 %1 / 10 % 10
set %d3 %1 / 100 % 10
set %d4 %1 / 1000 % 10
set %d5 %1 / 10000 % 10
set %d6 %1 / 100000 % 10
set %tempampm %d6 , %d5
if %tempampm > 12 && %2 = 12
{
set %AMPM PM
set %tempampm %tempampm - 12
}
if %2 = 12
return %tempampm , : , %d4 , %d3 , : , %d2 , %d1 , #SPC , %AMPM
return %tempampm , : , %d4 , %d3 , : , %d2 , %d1
gosub time #time 12 <------ this is how the sub is called. I get #time will return the computer local time, but im missing what the (12) is for
This is a sub from an old idoc timing script. Im writing my own and was using this to learn a few things from. I got it about all done other that the time part. I dont understand any of this sub. I searched the forums on time as in actual time and found very little information so was hoping that someone could maybe explain this by each line. Thanks