Click or drag to resize

Time24 Function

X#
Return the system time in 24-hour format.

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

Return Value

Type: String
The system time in the form hh:mO:ss, where hh is hours in 24-hour format, mm is minutes, and ss is seconds.
Remarks
Time24() does not depend on any other setting to determine its output format. Instead, it 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 Time24() used with Substr() to extract the hour, minutes, and seconds:
X#
1? Time24()                // 10:37:17
2? Substr3(Time24(), 1, 2)        // 10
3? Substr3(Time24(), 4, 2)        // 37
4? Substr3(Time24(), 7, 2)        // 17
See Also

Reference

Time24