Xbasic

CTODT Function

Syntax

Date_Time_Value as T = CTODT(C character)

Arguments

character

A character string containing a legitimate representation of a date time value.

Description

The CTODT() function converts a date and time string to a Date Time value (date + time).

Example

? ctodt("1/23/2003 11:45")
= 01/23/2003 11:45:00 00 am
? ctodt(dtoc(date() ) + " " + time() )
= 11/04/2003 03:57:00 00 pm

As of Version 10.5, if the 'am' or 'pm' flag is left out, Alpha Anywhere now assumes that the user is specifying a time using a 24 hour format. Previously, a time value of '00:00:00' was considered to be invalid. Now this is a valid 24 hour format time value.

See Also