TTOD( ) Function Example

The following example creates a Datetime type variable named gtDtime. TYPE( ) displays T, indicating the variable is a Datetime type. TTOD( ) is used to convert the variable to a date type, and TYPE( ) now displays D, indicating the variable is a date type after the conversion.

STORE DATETIME( ) TO gtDtime  && Creates a Datetime type memory variable
CLEAR
? "gtDtime is type: "  
?? TYPE('gtDtime')  && Displays T, Datetime type value

gtDtime = TTOD(gtDtime)     &&  Converts gtDtime to a date value
? "gtDtime is now type: "  
?? TYPE('gtDtime')  && Displays D, character type value