qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
PackTime and UnpackTime Procedures
  Summary Details Example                                   Back
 
  Arguments
 
    date_time    Record variable of type DateTime
 
    time         Date and time in packed 4-byte format
 
  Description
 
    The PackTime procedure converts date and time information from a
    record of type DateTime into a packed form encoded in four bytes.
 
    The UnpackTime procedure converts date and time from a packed
    4-byte form into fields of type word in a DateTime record.
 
    The DateTime type is defined in the Dos unit. The record has
    fields for year, month, day, hours, minutes, and seconds.
 
    Packed time format contains date and time components in bit
    fields within the four bytes of a LongInt:
 
      Bits     Values    Component
      ═════    ══════    ═════════
      0-5      0..59     Seconds
      6-11     0..59     Minutes
      12-16    0..23     Hours
      17-21    1..31     Day
      22-25    1..12     Month
      26-31    0..99     Year
 
    Both the SetFTime and UnpackTime procedures take argument values
    in a packed format. The procedures FindFirst, FindNext, GetFTime,
    and PackTime retrieve values in a packed format.