TIME$( )

Description:

This function can return either a string or a number.

STRING

It returns a string representing the current time of the system clock in 24 hour format. This function replaces the time$ variable used in QBasic. See also DATE$( ), Date and Time Functions

this form of time$() produces this format

 print time$() 'time now as string

results in:

  16:21:44

NUMBER

When TIME$() includes a template string within the parenthesis, it returns a number indicating the seconds or milliseconds since midnight.

  print time$("seconds") 'seconds since midnight as number

Produces:

  32314

print time$("milliseconds") 'milliseconds since midnight as number

Produces:

  33221342

print time$("ms") 'milliseconds since midnight as number

Produces:

  33221342

Usage:

  'display the opening screen
  print "Main selection screen."
  print "Time now: "; time$()
  print "Seconds since midnight: ";time$("seconds")
  print "Milliseconds since midnight: ";time$("ms")
  print
  print "1. Add new record"
  print "2. Modify existing record"
  print "3. Delete record"
 input a$