Click or drag to resize

Time Function

X#
Return the system time in a format determined by various international settings.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax
 FUNCTION Time() AS STRING
Request Example View Source

Return Value

Type: String
The format of the return value is dependent on several functions, including SetAMPM(), SetAMExt(), SetPMExt(), and SetInternational(), which you can refer to for more information.
Remarks
Time() returns the system time. Time() is related to Seconds(), which returns the integer value representing the number of seconds since midnight.
Examples
These examples show the results of Time() under various circumstances:
X#
1SetInternational(#Windows)
2// Assuming 12-hour time with "AM" and "PM"extensions
3// and colon separator set in Control Panel
4? Time()                    // 02:37:17 PM
5SetInternational(#Clipper)
6? Time()                    // 14:37:19
7SetAMPM(TRUE)            // 12-hour format
8SetPMExt(" pm")
9? Time()                    // 02:37:21 pm
See Also