STOTS()

Advantage Concepts

Advantage Expression Engine function that converts a character string formatted as 'YYYYMMDD HH:MM:SS.mmm' to a timestamp value

Syntax

STOTS(<cTimestamp>) -> Timestamp

Parameters

<cTimestamp>

A character string consisting of a date and a time. The year consists of numbers representing the year, month, and day in the format YYYYMMDD, and the time is in the form HH:MM:SS.mmm.

Return Values

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

Remarks

STOTS() is a character conversion function that converts a character string to a timestamp. STOTS() can be used whenever you need a literal DateTime value. It differs from CTOTS() in that the date format is fixed and does not depend on the current date format setting. Some examples of its use 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

STOTS( "19950216 2:00:00pm" )

 

STOTS( "19950216 2:00pm" )

 

STOTS( "19950216 14:00:00.55" )

 

STOTS( "19950216" )

See Also

CTOD()

CTOT()

CTOTS()

DATE()

DTOC()

DTOS()

TSTOD()