9.3.36 DATE_AND_TIME ([DATE] [, TIME] [, ZONE] [, VALUES])

Description:  Returns character data on the real-time clock and date in a form compatible with the representations defined in Standard ISO 8601:1988.  
Class:  Subroutine 
Arguments:  There are four optional arguments1
  DATE (opt)             Must be scalar and of type default character; its length must be at least 8 to contain the complete value. Its leftmost 8 characters are set to 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
   DD is the day within the month
  TIME (opt)  Must be scalar and of type default character; its length must be at least 10 to contain the complete value. Its leftmost 10 characters are set to a value of the form hhmmss.sss, where:
   hh     is the hour of the day
   mm     is the minutes of the hour
   ss.sss is the seconds and milliseconds of the minute
  ZONE (opt)  Must be scalar and of type default character; its length must be at least 5 to contain the complete value. Its leftmost 5 characters are set to a value of the form hhmm, where hh and mm are the time difference with respect to Coordinated Universal Time (UTC)2 in hours and parts of an hour expressed in minutes, respectively. 
  VALUES (opt) Must be of type default integer and of rank one. Its size must be at least 8. The values returned in VALUES are as follows:
   VALUES (1) is the 4-digit year.
   VALUES (2) is the month of the year.
   VALUES (3) is the day of the month.
   VALUES (4) is the time difference with respect to
              Coordinated Universal Time (UTC) in minutes.
   VALUES (5) is the hour of the day (range 0 to 23).3
   VALUES (6) is the minutes of the hour (range 0 to 59).3
   VALUES (7) is the seconds of the minute (range 0 to 59).3
   VALUES (8) is the milliseconds of the second (range 0 to 999).3
1 All are INTENT(OUT) arguments. (See Section 5.10.)
2 UTC (also known as Greenwich Mean Time) is defined by CCIR Recommendation 460-2.
3 In local time.

Examples

Consider the following example executed 2000 March 28 at 11:04:14.5:

INTEGER DATE_TIME (8)
CHARACTER (LEN = 12) REAL_CLOCK (3)
CALL DATE_AND_TIME (REAL_CLOCK (1), REAL_CLOCK (2), &
                    REAL_CLOCK (3), DATE_TIME)

This assigns the value "20000328" to REAL_CLOCK (1), the value "110414.500" to REAL_CLOCK (2), and the value "-0500" to REAL_CLOCK (3). The following values are assigned to DATE_TIME: 2000, 3, 28, -300, 11, 4, 14, and 500.


Previous Page Next Page Table of Contents