Navigation:  »No topics above this level«

STOD()

Advantage Concepts

Return to chapter overview

Scalar function that converts a character string formatted as YYYYMMDD to a date value.

Supported in SQL:

Yes

Supported in Navigational:

Yes

Syntax

STOD(<cDate>) -> dDate

Parameters

<cDate>

A character string consisting of numbers representing the year, month, and day in the format YYYYMMDD.

Return Values

STOD() returns a date value. If <cDate> is not a valid date, STOD() returns an empty date.

Remarks

STOD() is a character conversion function that converts a character string to a date. STOD() can be 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

STOD() is the inverse of DTOS() which converts a date value to a character string in the format YYYYMMDD.

Note Binary and image fields are not supported by this function. Memo fields are supported by the SQL version of the scalar.

See Also

DATE()

DTOC()

DTOS()

CTOD()

CTOT()

CTOTS()

TSTOD()