DATE AND TIME ([DATE, TIME, ZONE, VALUES])



Optional Arguments. DATE, TIME, ZONE, VALUES
Description. Returns data about the real-time clock and date in a form compatible with the representations defined in ISO 8601:1988.
Class. Subroutine.
Arguments.
DATE (optional) shall be scalar and of type default character. It is an INTENT (OUT) argument. It is assigned a value of the form CCYYMMDD, where CC is the century, YY is the year within the century, MM is the month within the year, and DD is the day within the month. If there is no date available, DATE is assigned all blanks.
TIME (optional) shall be scalar and of type default character. It is an INTENT (OUT) argument. It is assigned a value of the form hhmmss.sss, where hh is the hour of the day, mm is the minutes of the hour, and ss.sss is the seconds and milliseconds of the minute. If there is no clock available, TIME is assigned all blanks.
ZONE (optional) shall be scalar and of type default character. It is an INTENT (OUT) argument. It is assigned a value of the form +hhmm or -hhmm, where hh and mm are the time difference with respect to Coordinated Universal Time (UTC) in hours and minutes, respectively. If this information is not available, ZONE is assigned all blanks.
VALUES (optional) shall be of type default integer and of rank one. It is an INTENT (OUT) argument. Its size shall be at least 8. The values returned in VALUES are as follows:
VALUES (1) the year, including the century (for example, 1990), or {HUGE (0) if there is no date available;
VALUES (2) the month of the year, or {HUGE (0) if there is no date available;
VALUES (3) the day of the month, or {HUGE (0) if there is no date available;
VALUES (4) the time difference with respect to Coordinated Universal Time (UTC) in minutes, or {HUGE (0) if this information is not available;
VALUES (5) the hour of the day, in the range of 0 to 23, or {HUGE (0) if there is no clock;
VALUES (6) the minutes of the hour, in the range 0 to 59, or {HUGE (0) if there is no clock;
VALUES (7) the seconds of the minute, in the range 0 to 60, or {HUGE (0) if there is no clock;
VALUES (8) the milliseconds of the second, in the range 0 to 999, or {HUGE (0) if there is no clock.


Example.

INTEGER DATE TIME (8) 
CHARACTER (LEN = 10) BIG BEN (3) 
CALL DATE AND TIME (BIG BEN (1), BIG BEN (2), BIG BEN (3), DATE TIME)

If run in Geneva, Switzerland on April 12, 1985 at 15:27:35.5 with a system configured for the 18 local time zone, this sample would have assigned the value 19850412 to BIG BEN (1), the value 19 152735.500 to BIG BEN (2), the value +0100 to BIG BEN (3), and the value (/ 1985, 4, 12, 20 60, 15, 27, 35, 500 /) to DATE TIME. 21


Back to Basic API and user's guide