Click or drag to resize

Functions.SetPMExt Method (String)

X#
Set the evening extension for time strings in 12-hour format.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.16
Syntax
 FUNCTION SetPMExt(
	cPMExt AS STRING
) AS STRING
Request Example View Source

Parameters

cPMExt
Type: String
The extension to be used for time strings that occur in the evening hours.
This string can be up to eight characters in length — additional characters are ignored.

Return Value

Type: String
Remarks
Time strings formatted using the 12-hour time format have an extension to specify if the time is in the morning or the evening. SetPMExt() allows you to programmatically set the extension identifying evening time strings (that is, those between 12:00:00 noon and just before 12:00:00 midnight).
A typical extension for evening time strings is "PM", which is how the function derives its name. The initial default for the evening extension is affected by SetInternational(), which you can refer to for more information.
Use GetPMExt() to retrieve the current value of this setting. Note:
If SetInternational(#Windows) is in effect, the evening extension is also displayed as part of the 24-hour time format.
This is a Windows standard that is not specific to X#.
Examples
This example turns on the 12-hour time format and displays a time string using two different extensions:
X#
1SetAMPM(TRUE)
2SetPMExt(" pm")
3? TString(47000)        // 01:03:20 pm
4SetAMExt(" evening")
5? TString(47000)        // 01:03:20 evening
See Also