CTOTS()

Advantage Concepts

Advantage Expression Engine function that returns a Timestamp value from a character expression.

Syntax

CTOTS( <cTimestamp> )

Parameters

<cTimestamp>

Specifies the character expression from which a timestamp value is returned. The proper format for the date component of <cTimestamp> is determined by the current setting of the function to set the date format.

Return Value

CTOTS() returns a timestamp value. If <cTimestamp> is not a valid timestamp, CTOTS() returns an empty timestamp (0).

Remarks

CTOTS() is a character conversion function that converts a character string to a time. CTOTS() is used whenever you need a literal DateTime value. Some examples include:

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.

Examples

CTOTS( "02/16/95 2:00:00pm" )

CTOTS( "02/16/95 2:00pm" )

CTOTS( "02/16/95 14:00:00.55" )

CTOTS( "02/16/95" )

 

If only a date portion is specified in <cTimeStamp>, a default time of midnight (12:00:00 A.M.) is added to <cTimeStamp>.

See Also

CTOT()

CTOD()

DTOS()

STOD()

STOTS()

TSTOD()

Advantage TDataSet Descendant

AdsGetTime

AdsGetDate

AdsGetMilliseconds

TAdsSettings.DateFormat

Advantage Client Engine API

AdsGetTime

AdsGetDate

AdsGetMilliseconds

AdsGetDateFormat