C5_DTOS

 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



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.