Click or drag to resize

TimePsz24 Function

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

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION TimePsz24() AS PSZ
Request Example View Source

Return Value

Type: Psz
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
Tip Tip
The PSZ type is included in the X# language and runtime for compatibility only. In most cases the type can and should be replaced with normal strings.
If you need to interface with Win32 API functions that expect an ansi string, there is often also an alternative with a unicode string. We recommend to use that alternative when possible.
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