TIME real-valued function (The function returns the value -1 if the input string does not have an acceptable format [see the example below].) The individual date and time elements are defined as follows: If the string parameter is not supplied and the select parameter is 1, the current date of the system clock is returned. In addition, the current time of the system clock is stored in the (internal) administrative data for the program task. If the string parameter is not supplied and the select parameter is 2 or 3, the selected time value is returned for the system-clock time previously saved.
Example The following program segment shows how the TIME real-valued function can be used to make sure you enter a valid date and time after a prompt: PROMPT "Enter the date and time (dd-mmm-yy hh:mm:ss): ", $time WHILE (TIME($time,1) == -1) DO ;Make sure it's valid TYPE /B, " Cannot interpret date/time." PROMPT "Try again (dd-mmm-yy hh:mm:ss):
", $time END TIME $time ;Set system time Related Keywords TIME monitor command TIME program instruction $TIME string function eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 530 Element Description dd The day of the month (1 to 31) mmm The month, specified as a 3-letter abbreviation (JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, or DEC) yy The year, where 80 to 99 represent 1980 through 1999, respectively, and 00 to 79 represent 2000 through 2079, respectively. yyyy The year (1980 to 2079) hh The hour of the day (0 to 23) mm Minutes past the hour (0 to 59) ss Seconds past the minute (0 to 59; 0 assumed if :ss omitted)