AmPm Function | |
Convert a 24-hour military time to a 12-hour clock time.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax FUNCTION AmPm(
c24HrTime AS STRING
) AS STRING
public static string AmPm(
string c24HrTime
)
Request Example
View SourceParameters
- c24HrTime
- Type: String
A valid military time in the form hh:mO:ss, where hh is hours in 24-hour format, mm is minutes, and ss is seconds.
Return Value
Type:
String
An 11-character string in 12-hour format with either "am" or "pm."
If
cTime does not represent a valid military time, a NULL_STRING is returned.
Remarks Examples
These examples use AmPm():
1? AmPm("10:45:23")
2? AmPm("22:45:23")
3? AmPm("10:45:23Hello")
4? AmPm("1045")
5? AmPm("10:45")
See Also