[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Function:    PackDate()

               This function packs a Clipper Date variable into a
               2 byte string. This packaging method is very handy
               as it can be used in various ways, where using 2
               chars instead of 8 might come in handy. Examples
               of such usage are in the storing of Data
               variables, but also in the indexing on existing
               databases, as the Packed date is stored in such a
               way that order is preserved. The PackDate (and
               relating) function(s) have been written in
               assembly completely, so that it also offers a
               tremendous run-time saving as the code is very
               efficient (handy in indices for instance). One can
               always use the UnPackDate() function to recover
               the packed date.
               NOTE: PackDate only works on dates AFTER 1980,
               dates before 1980 give unpredictable results. This
               was needed because PackDate conforms to the DOS
               date and time packing format.

  Syntax:      PackDate(<dVar>) --> cPackedDate

  Arguments:   the Date to pack.

  Returns:     a 2 char string representing the date, ordered.
               Note that the string may contain any kind of
               characters (also imbedded Chr(0)'s).

  Usage:       * - Put a TimeStamp on the Log database..
               Select LOG
               Replace stamp with ;
                    PackDate(Date())+PackTime(Time())
               * - Now do whatever with the Log that needs
               *   recording..

See Also: UnPackDate() PackTime()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson