[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DTOS()
 Convert a date value to a character string formatted as yyyymmdd
------------------------------------------------------------------------------
 Syntax

     DTOS(<dDate>) --> cDate

 Arguments

     <dDate> is the date value to convert.

 Returns

     DTOS() returns a character string eight characters long in the format
     yyyymmdd.  When <dDate> is a null date (CTOD("")), DTOS() returns a
     string of eight spaces.  The return value is not affected by the current
     date format.

 Description

     DTOS() is a date conversion function that is used when creating index
     expressions consisting of a date value and a character expression.
     DTOS() converts a date value to a character string that can be
     concatenated to any other character expression.  The return value is
     structured to preserve date order (year, month, and day).

 Examples

     .  These examples illustrate DTOS() in conjunction with several
        other functions:

        ? DATE()                        // Result: 09/01/90

        ? DTOS(DATE())                  // Result: 19900901
        ? LEN(DTOS(CTOD("")))           // Result: 8

     .  This example demonstrates how to create an index with a
        compound date and character key using DTOS():

        USE Sales NEW
        INDEX ON DTOS(Date) + Salesman TO DateName

 Files   Library is CLIPPER.LIB.


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