Advantage Concepts
Advantage Expression Engine function that converts a character string formatted as 'YYYYMMDD HH:MM:SS.mmm' to a timestamp value
STOTS(<cTimestamp>) -> Timestamp
<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. |
STOTS() returns a timestamp value. If <cTimestamp> is not a valid timestamp, CTOTS() returns an empty timestamp.
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:
Comparing the result of a timestamp expression to a literal timestamp string.
Defining a filter that compares a literal timestamp string with a timestamp field. For example, if a table has a timestamp field named 'timestamp', then the filter "STOTS( '19960913 14:30:45') > timestamp" could be used to find all records where the timestamp field has a date and time earlier than the given value.
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.
STOTS( "19950216 2:00:00pm" )
STOTS( "19950216 2:00pm" )
STOTS( "19950216 14:00:00.55" )
STOTS( "19950216" )