TIME$
From CometWiki
(Difference between revisions)
(New page: == TIME$ == System variable: TIME$ <br> Length: 11 <br> Description: <br> The system variable named TIME$ contains the current system time. This variable is an 11-byte string in ...) |
|||
Line 1: | Line 1: | ||
- | |||
== TIME$ == | == TIME$ == | ||
Line 19: | Line 18: | ||
The name usually configured for the clock is CL1 (although an alternative name can be chosen during system configuration). | The name usually configured for the clock is CL1 (although an alternative name can be chosen during system configuration). | ||
+ | |||
+ | '''Alternative Method''' | ||
+ | |||
+ | Try getting the time as follows: | ||
+ | |||
+ | ATIME$ = Num2Date(0,6) | ||
+ | |||
+ | It is easier, faster, and more accurate. | ||
+ | |||
+ | Refer [[IB/Num2Date|Num2Date]] |
Revision as of 09:14, 11 June 2009
TIME$
System variable: TIME$
Length: 11
Description:
The system variable named TIME$ contains the current system time. This variable is an 11-byte string in the format "HH:MM:SS.DD", where "HH" represents the hour in 24-hour format, "MM" represents the minute from 0 to 60, "SS" represents the second from 0 to 60, and "DD" represents the hundredths of a second from 0 to 99.
Even though all Comet systems have a clock, TIME$ is not updated until:
- the clock is opened and read, or
- the DSTAT function is used on the clock:
- A$ = DSTAT("CL1")
The name usually configured for the clock is CL1 (although an alternative name can be chosen during system configuration).
Alternative Method
Try getting the time as follows:
ATIME$ = Num2Date(0,6)
It is easier, faster, and more accurate.
Refer Num2Date