TIME Function

The TIME function returns the current system time in internal format.

Format

TIME( )

Description

The TIME function returns a string value expressing the internal time of day. The internal time expression represents the number of seconds that have passed since midnight to the nearest second.

The DATE function may be used to return the current date in internal format. To receive the time and date in external format, the TIMEDATE function may be used. See TIMEDATE Function for more information.

Example

In this application, the program checks the time of day and informs the user if it is too late to record the transaction that afternoon.

TIME = TIME( )

FIVE.PM = 3600 * 17

IF TIME > FIVE.PM THEN

   PRINT "IT IS CURRENTLY AFTER FIVE PM."

   PRINT "YOUR TRANSACTION WILL NOT BE RECORDED" :

   PRINT "UNTIL THE NEXT BUSINESS DAY."

END ELSE

   GOSUB RECORD

END

See Also

Statement and Function Reference