C5_DTOC

 DTOC()
 Convert a date value to a character string
------------------------------------------------------------------------------
 Syntax

     DTOC(<dDate>) --> cDate

 Arguments

     <dDate> is the date value to convert.

 Returns

     DTOC() returns a character string representation of a date value.  The
     return value is formatted in the current date format.  The default
     format is mm/dd/yy.  A null date returns a string of spaces equal in
     length to the current date format.

 Description

     DTOC() is a date conversion function used for formatting purposes when
     you want to display the date in the SET DATE format and when a character
     expression is required (in a LABEL FORM, for example).  If you need a
     specialized date format, you can use TRANSFORM() or a custom expression.

     If you are INDEXing a date in combination with a character string, use
     DTOS() instead of DTOC() to convert the date value to a character
     string.

 Examples

     .  These examples show general uses of DTOC():

        ? DATE()                  // Result: 09/01/90
        ? DTOC(DATE())            // Result: 09/01/90
        ? "Today is " + DTOC(DATE())
                                // Result: Today is 09/01/90

 Files   Library is CLIPPER.LIB.

See Also: CTOD() DATE() DTOS() SET CENTURY SET DATE



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.