Number Intrinsic Functions - IsTime Method

Test if the variable is a valid time

Member of Number Intrinsic Functions (PRIM_LIBI.INumberIntrinsics)

Parameters

Name

Type

Data Type

Description

Result

*Result (Optional)

Boolean

True if the variable is a valid time

Format

*Input (Optional)

Enumeration

Format of the time

Details

IsTime will return True if the variable can be converted to a valid time using the specified format.

IsTime will often be used before AsTime to better handle potential errors.

Allowed Formats

Enum Value

Description

HHMMSS

e.g. "113045"

Seconds

Number of seconds since 00:00:00

Example

In this example, #Variable is tested to ensure it's in the format HHMMSS before being assigned to #Result

     If (#Variable.IsTime(HHMMSS))
#Result := #Variable.AsTime(HHMMSS)
Endif

See also

All Component Classes

Technical Reference

  • No labels