The WRTSTIME function accepts a date and time in one of five formats and converts the value to native OpenVMS 64-bit DEC Date/Time format. This allows the storage of native DEC Date/Time values in data sources such as RMS files and Rdb database tables that use this native format.
WRTSTIME(formatstyle, infield, output)
Is a number from 0 to 4, from the list below, that corresponds to the desired formatting styles for infield.
0 denotes DD-MMM-YYYY HH:MM:SS
1 denotes DD-MMM-YYYY
2 denotes HH:MM:SS
3 denotes DD-MMM-YYYY HH:MM:SS.CC
4 denotes YYYY-MM-DD HH:MM:SS.CC
Is the name of a field containing the user-supplied date and/or time string to be converted. The expected length of infield is determined by the formatstyle as listed below.
Format Style Number
Is the field that contains the result, or the format of the output value enclosed in single quotation marks.