Advantage Concepts
Advantage Expression Engine function that converts a date string to a date value
CTOD(<cDate>) à dDate
<cDate> |
A character string consisting of numbers representing the month, day, and year separated by any character other than a number. The month, day, and year digits must be specified in accordance with the function to set the date format. |
CTOD() returns a date value. If <cDate> is not a valid date, CTOD() returns an empty date.
CTOD() is a character conversion function that converts a character string to a date. CTOD() is used whenever you need a literal date value. Some examples include:
Specifying a literal date string in order to perform date arithmetic
Comparing the result of a date expression to a literal date string
CTOD() is the inverse of DTOC() which converts a date value to a character string in the format specified by the function to set the date format. DTOS() also converts a date value to a character string in the form yyyymmdd.
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.
Note Memo, binary, and image fields are not supported in this Advantage Expression Engine function. If memo, binary, or image fields are used with this expression engine function, the Advantage Expression Engine will be unable to evaluate the expression.
AdsSetDate
TAdsSettings.DateFormat
AdsSetDateFormat
AdsSetEpoch