Purpose
The time function returns the current system time in string format. The time may be returned in 12- or 24-hour time format. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
StringVar = Time( format )
StringVar is a string variable which will be given the system time in hh:mm:ss format, where hh is hour, mm is minutes, and ss is seconds.
format an integer value indicating the format of the string to return. A vlue of 24 returns the time in 24-hour format, any other value returns the time in 12-hour format.
Description
This function is equivalent to calling FormatTime$(CurTime()). Where print Time(12)
is the same as FormatTime$(CurTime(), "h:mm:ss")
and Time(24)
is the same as FormatTime$(CurTime(), "H:mm:ss")
.
See also:
Date and Time Functions, FormatTime$() function, GetTime() function