UNPACKTIMEQQ

Run-Time Subroutine: Unpacks a packed time and date value into its component parts.

Module: USE DFLIB

Syntax

CALL UNPACKTIMEQQ (timedate, iyr, imon, iday, ihr, imin, isec)

timedate
(Input) INTEGER(4). Packed time and date information.


iyr
(Output) INTEGER(2). Year (xxxx AD).


imon
(Output) INTEGER(2). Month (1 - 12).


iday
(Output) INTEGER(2). Day (1 - 31).


ihr
(Output) INTEGER(2). Hour (0 - 23).


imin
(Output) INTEGER(2). Minute (0 - 59).


isec
(Output) INTEGER(2). Second (0 - 59).

GETFILEINFOQQ returns time and date in a packed format. You can use UNPACKTIMEQQ to unpack these values. Use PACKTIMEQQ to repack times for passing to SETFILETIMEQQ. Packed times can be compared using relational operators.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: PACKTIMEQQ, GETFILEINFOQQ

Example

 USE DFLIB
 CHARACTER(80)    file
 TYPE (FILE$INFO) info
 INTEGER(4) handle, result
 INTEGER(2) iyr, imon, iday, ihr, imin, isec

 file = 'd:\f90ps\bin\t???.*'
 handle = FILE$FIRST
 result = GETFILEINFOQQ(file, info, handle)
 CALL UNPACKTIMEQQ(info%lastwrite, iyr, imon,&
                   iday, ihr, imin, isec)
 WRITE(*,*) iyr, imon, iday
 WRITE(*,*) ihr, imin, isec
 END