[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson