How to: |
The HTIME function converts the time portion of a timestamp in date-time format to the number of milliseconds if the first argument is 8, or microseconds if the first argument is 10. To include microseconds, the input timestamp format must be a 10-byte date-time format.
HTIME(length, timestamp, output_format)
where:
Integer
Is the number of characters returned as a timestamp. Valid values are:
Date-Time
Is the timestamp from which to convert the time.
Is floating-point double precision format.
Assuming that the current date and time obtained by HGETC in the second parameter are 03/31/2004 and 13:48:14, this example returns and assigns to NMILLI, 49,694,395. (Note that this example uses milliseconds rather than microseconds.)
NMILLI/D12.0 = HTIME(8, HGETC(10,'HYYMDS'), NMICRO);
Assuming that the first parameter is equal to 10 and the timestamp format is HYYMDSS, this example returns and assigns to NMICRO, 50,686,123,024.
NMICRO/D12.0 = HTIME(10, HGETC(10,'HYYMDSS'), NMICRO);
iWay Software |