: TIME Insert or save to Variable - < time >() ... [Free]
Date & Time : TIME Insert or save to Variable <time>(Minute shift,Hour leading zero,Minute leading zero,Format,Time base,"Variable for result") Available in: Free edition
|
The command inserts time (e.g., 2:09 AM) into the currently active window or saves it to required variable.
|
#
|
Parameter name
|
Parameter description
|
1
|
Minute shift
|
The time shift in minutes relative to the current time. 0 for no shift, -1 for time one minute back, +1 for time one minute later, etc. Can be a number or variable containing numeric value.
|
2
|
Hour leading zero
|
If 1, the hour is displayed with leading zero (e.g., 02). If 0, the hour is displayed without leading zero (e.g., 2). Can be a number or variable containing numeric value.
|
3
|
Minute leading zero
|
If 1, the minute is displayed with leading zero (e.g., 09). If 0, the minute is displayed without leading zero (e.g., 9). Can be a number or variable containing numeric value.
|
4
|
Format
|
Format used to produce time information. This is a free form text that can contain the following placeholders: HH - is replaced by hours MM - is replaced by minutes SS - is replaced by seconds a.m.p.m. - is replaced by a.m. or p.m. ampm - is replaced by am or pm A.M.P.M. - is replaced by A.M. or P.M. AMPM - is replaced by AM or PM
Default format is HH:MM:SS.
Note: The format cannot contain comma character and brackets. Use a system variable such as %_vKeyBracketL%.
|
5
|
Time base
|
If 0, the 24 hours time base is used. If 1, the 12 hours time base is used.
|
6
|
Variable for result
|
Variable that receives the time. If this variable name is an empty string, the time is send to active application as a set of keystrokes.
|
|
|
Example (Macro Steps):
|
1
|
<#> <#> Run this macro in Notepad:
|
2
|
Current time (24-hours base, no AM/PM) is:
|
3
|
Date & Time : TIME Insert or save to Variable Minute shift=0, Hour leading zero=Yes, Minute leading zero=Yes, Format = 0, Time base = 24 Hours, Variable for result =
|
4
|
\ Current time (12-hours base, with AM/PM) is:
|
5
|
Date & Time : TIME Insert or save to Variable Minute shift=0, Hour leading zero=Yes, Minute leading zero=Yes, Format = 1, Time base = 12 Hours, Variable for result =
|
|
Example (Plain Text):
<#> Run this macro in Notepad:
Current time (24-hours base, no AM/PM) is: <time>(0,1,1,0,0,"")
Current time (12-hours base, with AM/PM) is: <time>(0,1,1,1,1,"")