10 6 11 AsTime

LANSA Technical

10.6.11 AsTime

AsTime will return a time based on the value of the string and the specified format.

If the supplied value does not conform to the required format, the application will end with a run-time error. Use the IsTime intrinsic to test the value before attempting to convert to a time.

Input Parameters

Format - Time format expected in the numeric variable. Allowable formats are:

     HHMMSS

     HHsMMsSS

     ISO

Example

If (#string.IsTime(hhmmss)

 

#Time := #string.AsTime(hhmmss)

 

else

 

* Error processing

 

Endif

 

Ý 10.6 Alphanumeric/String Intrinsic Functions