Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>dtos()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DTOS()


Syntax:     DTOS(<expD>)

Purpose:    To convert a date value to a character string suitable for
            INDEXing in a compound key.

Argument:   <expD> is the date value to convert.

Returns:    A character string.

            DTOS() returns a string eight characters long in the format,
            "yyyymmdd."  When <expD> evaluates to a null date, DTOS()
            returns a string of eight spaces.

Usage:      The intention of DTOS() is to facilitate the ease of
            creating index key expressions consisting of a date value
            and character expressions independent of DATE and CENTURY
            SETtings and preserving date order (year, month, and day).

Library:    CLIPPER.LIB


----------------------------------- Examples -------------------------------

   ? DATE()                      && Result: 09/01/87
   ? DTOS(DATE())                && Result: 19870901
   cdate = DTOS(DATE())
   ? TYPE("cdate")               && Result: C
   ? LEN(DTOS(CTOD("")))         && Result: 8
   *
   USE Sales
   INDEX ON DTOS(Date) + Salesman TO DateName


See Also: INDEX DTOC()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson