How to: |
The HMIDNT function changes the time portion of a date-time value to midnight (all zeros by default). This allows you to compare a date field with a date-time field.
HMIDNT(datetime, length, output)
where:
Date-time
Is the date-time value whose time is to be set to midnight.
Integer
Is the length of the returned date-time value. Valid values are:
8 indicates a time value that includes milliseconds.
10 indicates a time value that includes microseconds.
12 indicates a time value that includes nanoseconds.
Date-time
Is the date-time return value whose time is set to midnight and whose date is copied from timestamp.
This example converts the character string (20040229 13:34:00) to a timestamp, which is assigned to DTM:
DTM/HYYMDS = HINPUT(14, '20040229 13:34:00', 8, DTM);
This example resets the time portion of DTM to midnight and assigned the timestamp (02/29/2004 00:00:00) to DTMIDNT:
DTMIDNT/HMDYYS = HMIDNT(DTM, 8, DTMIDNT);
iWay Software |