How to: |
The HINPUT function converts an alphanumeric string to a date-time value.
HINPUT(source_length, 'source_string', output_length, output)
where:
Integer
Is the number of characters in the source string to be converted.
Alphanumeric
Is the string to be converted.
Integer
Is the length of the returned date-time value. Valid values are:
8 indicates a time value that includes one to three decimal digits (milliseconds).
10 indicates a time value that includes four to six decimal digits (microseconds).
12 indicates a time value that includes seven to nine decimal digits (nanoseconds).
Date-time
Is the returned date-time value.
This example,
DTM/HYYMDS = HINPUT(14, '20040229 13:34:00', 8, DTM);
converts the character string (20040229 13:34:00) into a timestamp, which is then assigned to the date-time field DTM. DTM is displayed as 2004/02/29 13:34:00.
iWay Software |