GETSTIME: Extracting the System Date and Time (OpenVMS Only)

How to:

The GETSTIME function extracts the current 64-bit DEC Date/Time value from the system.


Top of page

x
Syntax: How to Extract the System Date and Time
GETSTIME(output)

where:

output

A8

Is the field that contains the result, or the format of the output value enclosed in single quotation marks.



Example: Extracting and Displaying the System Date

This request displays employee department assignments and salaries with a heading that includes the current date.

DEFINE FILE EMPLOYEE
SYSTEM_DATE/A8 = GETSTIME('A8') ;
CVTDATE/A22 = CVTSTIME(4,SYSTEM_DATE,'A22') ;
END
TABLE FILE EMPLOYEE
HEADING
"SALARY REPORT RUN ON: <CVTDATE"
PRINT DEPARTMENT CURR_SAL 
BY LAST_NAME BY FIRST_NAME
END

WebFOCUS