How to: |
The HDTTM function converts a date value to a timestamp value. The time portion or timestamp is set to midnight.
HDTTM(date, length, output_format)
where:
Date
Is the date to be converted. It must be a full component format date. For example, it can be MDYY or YYJUL.
Integer
Is the number of characters returned as the timestamp. Valid values are:
Date-Time
Is the newly created timestamp.
This example converts the President's Day date into a timestamp:
TS/HYYMDS = HDTTM('February 16 2004', 8, TS)
the function returns 2004/02/16 00:00:00 and assigns this timestamp to field TS. Note the zero values of time components in the timestamp. Also note the use of natural date constants in single quotation marks for the date in the first function parameter.
iWay Software |