DTOC()

Advantage Concepts

Advantage Expression Engine function that converts a date value to a character string

Syntax

DTOC(<dDate>) à cDate

Parameters

<dDate>  The date value to convert.

Return Values

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/yyyy. A null date from a DBF table returns a string of spaces equal in length to the current date format. The function returns NULL if the parameter is a null date in an ADT table.

Remarks

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.

Note Advantage Expression Engine functions can be used in expressions such as record filter expressions and index expressions. They are not necessarily scalars supported within SQL statements. For a list of supported SQL scalar functions, see Supported Scalar Functions.

See Also

CTOD()

DATE()

DTOS()

STOD()

STOTS()

Advantage TDataSet Descendant

TAdsSettings.DateFormat

Advantage Client Engine API

AdsSetDateFormat