IsTime

Description

Reports whether the value of a string is a valid time value.

Syntax

IsTime ( timevalue )

Argument

Description

timevalue

A string whose value you want to test to determine whether it is a valid time


Return value

Boolean.

Returns true if timevalue is a valid time and false if it is not. If timevalue is null, IsTime returns null.

Usage

Use IsTime to test to whether a value a user enters in an edit control is a valid time.

To convert a string to an time value, use the Time function.

Examples

This statement returns true:

IsTime("8:00:00 am")

This statement returns false:

IsTime("25:00")

If the SingleLineEdit sle_EndTime contains 4:15 these statements store 04:15:00 in lt_QuitTime:

Time lt_QuitTime
IF IsTime sle_EndTime.Text) THEN
    lt_QuitTime = Time(sle_EndTime.Text)
END IF

See also

Time

IsTime method for DataWindows in the section called “IsTime” in DataWindow Reference.