Click or drag to resize

SetAmPm Function (Logic)

X#
Return and optionally change the setting that determines whether time strings are in 12-hour or 24-hour format.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION SetAmPm(
	lNewSetting AS LOGIC
) AS LOGIC
Request Example View Source

Parameters

lNewSetting
Type: Logic
TRUE indicates 12-hour format. FALSE indicates 24-hour format.
The initial default depends on SetInternational(), which you can refer to for more information.

Return Value

Type: Logic
If lNewSetting is not specified, SetAMPM() returns the current setting.
If lNewSetting is specified, the previous setting is returned.
Remarks
Examples
This example shows the difference between the 12-hour and 24-hour display formats:
X#
1SetPMExt(" pm")
2SetAMPM(FALSE)
3? TIME()        // Result: 13:10:15 pm
4SetAMPM(TRUE)
5? TIME()        // Result: 01:10:15 pm
See Also