[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CTOD()

    CTOD() converts a date string to a date value.

Syntax

    CTOD(<exp C>)

Argument

    <expC> is a character string consisting of number representing the
    month, day, and year separated by a delimiter character (any character
    other than a number).  When you pass the date string, CTOD() evaluates
    the order of the month, day, and year substrings according to the DATE
    SETting.  The default is AMERICAN ("mm/dd/yy").

    Century: A twentieth-century date is assumed if you only use two
    numbers for the year.

    Empty date: To specify a null date, use SPACE(8), "", or "  /  /  "
    as the function argument.

Returns

    A date value.

Usage

    CTOD() is useful whenever you want to use a character string as a date
    value.  There are a number of common instances which include:

    -  Initializing a memory variable as a date.

    -  Specifying a literal date string as an argument of a RANGE clause of
       @..GET.

    -  Specifying a literal date string in order to perform date
       arithmetic.

    -  Comparing the result of a date expression to a literal date string.

    -  REPLACEing a date field with a literal date string.

See Also: SET DATE CDOW DOW CMONTH MONTH DAY YEAR() DTOC DTOS DATE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson