Help Center
Help CenterFreeBASIC

Timefunction

Returns the current system time as a string

Date and Time Functionsfunctiondocumented

Syntax

Declare Function Time ( ) As String

Return value


Returns the current system time.

Description


Returns the current system time in the format hh:mm:ss.

Remarks

Usage


result = Time[$]

Differences from QB


  • The QB TIME statement (to set the system time) is now called SetTime.
  • The string type suffix "$" is required in the -lang qb dialect.
  • The string type suffix "$" is optional in the -lang fblite dialect.
  • The string type suffix "$" is ignored in the -lang fb dialect, warn only with the -w suffix compile option (or -w pedantic compile option).

See also


Example


Print "the current time is: "; Time


Reference

  • Documented in KeyPgTime.html