
Command Reference
308660-14.00 Rev 00
2-21
You can also get the ASCII code for a given character (indicated as one character
within single quotes, such as ‘c’).
The
let command also provides the following date and time functions:
• date( )
• time( )
• timezone( )
The function date( ) used with no arguments returns the current date in seconds. If
you enter a date string in the format MM/DD/YY (for example,
date(“10/7/95”)),
the function returns the number of seconds from January 1, 1900 to that date.
Dates may range from 1/1/00 (January 1, 1900) to 12/31/99 (December 31, 1999).
If you omit the year, the function uses the current year.
The function
time( ) used with no arguments returns the current local time in
seconds. If you enter a time string in the format HH:MM:SS (for example,
time(“7:04:32”)), HH:MM, or MM, the function returns the number of seconds
from 12:00 midnight to that time. HH must be a value between 0 and 23,
inclusive. MM must be a value between 0 and 59, inclusive. SS must be a value
between 0 and 59, inclusive.
The function
timezone( ) used with no arguments returns the current time zone in
seconds. If you enter a time-zone string in the format [+|-]HH:MM (for example,
timezone(“-08:00”)), the function returns the number of seconds for that time
zone from the International Date Line. You enter the time-zone string relative to
GMT, which is 43200 seconds offset from the International Date Line. The string
must begin with either a plus (+) or a minus (-) sign followed immediately by
HH:MM. HH must be a value between 0 and 11, inclusive, and MM must be a
value between 0 and 59, inclusive.
Example 3
The following example shows how to use the -date, -time, and -days flags and the
date( ), time( ), and timezone( ) functions of the let command:
Note:
In the previous examples, the date variables MM, DD, and YY represent
the numeric values of month, day, and year, respectively. The time variables
HH, MM, and SS represent the numeric values of hours, minutes, and seconds,
respectively.
Commentaires sur ces manuels