CTOT()

From Recital Documentation Wiki
Revision as of 17:02, 23 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Class

Expressions and Type Conversion


Purpose

Function to convert character to datetime


Syntax

CTOT(<expC>)


See Also

AMPM(), CDOW(), CMONTH(), CTOD(), DATE(), DATETIME(), DAY(), DAYS(), DMY(), DOW(), DTOC(), DTOM(), DTOS(), DTOV(), ELAPTIME(), EMPTY(), EPOCH(), GOMONTH(), HOUR(), HOURS(), LTOS(), MDY(), MINUTE(), MINUTES(), MONTH(), MTOD(), MTOS(), QUARTER(), SEC(), SECONDS(), SECS(), SET CENTURY, SET DATE, SET EPOCH, SET HOURS, SET MARK, SET SECONDS, SET VAXTIME, STOD(), STR(), TIME(), TIMESTAMP(), TSTRING(), TTOC(), TTOD(), TYPE(), VAL(), VALIDTIME(), VTOD(), WEEK(), YEAR()

Description

The CTOT() function is the character to datetime conversion function. It converts the character expression specified to a datetime variable. The character expression must be correctly formatted based on the current SET DATE, SET MARK, SET SECONDS and SET CENTURY settings. For example, the default settings, SET DATE AMERICAN, SET SECONDS ON and SET CENTURY ON, require a datetime in the format "MM/DD/YYYY HH:MM:SS AM/PM". If <expC> is an invalid datetime format the CTOT() function will return an empty datetime.


Example

mdate = ctot("01/21/2004 01:44:44 PM")
? mdate
01/21/2004 01:44:44 PM
? type("mdate")
T


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer