Time$ (Function)
Reads out the time from the internal clock.
Parameters
None.
Return Value
Returns the value of the character string.
The content of the value is the character string in which the time from the internal clock is given as Hour (HH), Minute (MM) and Second (SS), separated by colons (:).
The range of the time returned is as follows.
Hour (HH) : 00 - 23
Minute (MM) : 00 - 59
Second (SS) : 00 - 59
Description
Read out the time from the internal clock in the Controller.
The internal clock setting is performed using [System Settings] -> [Date/Time].
Example
Read out the date from the internal clock, change the format and output it to the macro console.
Dim NOW$(2)
NOW$=Time$
For I&=0 To 2
NOW$(I&) = Piece$(NOW$,":",I&+1,I&+1)
Next
Print NOW$(0)+"Hours"+NOW$(1)+"Minutes"+NOW$(2)+"Seconds"