In addition to the record number, the date and time form a convenient means of addressing history records which are, necessarily, stored in chronological order. To facilitate this, the NDF_HFIND routine provides a search facility which allows records to be identified by date and time:
INTEGER YMDHM( 5 )
LOGICAL EQ
REAL SEC
...
EQ = .FALSE.
CALL NDF_HFIND( INDF, YMDHM, SEC, EQ, IREC, STATUS )
Given a date and time (with the years, months, days, hours and minutes fields stored in the YMDHM array and the seconds field held in SEC), this routine will return the number of the first record written after the specified date and time. A record number of zero is returned if no such record exists.
In this example, the EQ argument is set .FALSE., which instructs the routine not to report an exact date/time match. By setting it to .TRUE., an exact match would be permitted. This makes it possible to select records according to any constraint on the date and time of creation, using combinations of the following techniques: