Advantage Concepts
Advantage Expression Engine function that returns a Timestamp value from a character expression.
CTOTS( <cTimestamp> )
<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. |
CTOTS() returns a timestamp value. If <cTimestamp> is not a valid timestamp, CTOTS() returns an empty timestamp (0).
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:
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 "CtoTS( ’9/30/1996 10:30am’) > 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.
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>.
AdsGetTime
AdsGetDate
AdsGetMilliseconds
TAdsSettings.DateFormat
AdsGetTime
AdsGetDate
AdsGetMilliseconds
AdsGetDateFormat