CMonth Function | |
Extract the name of the month from a date.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION CMonth(
dDate AS DATE
) AS STRING
public static string CMonth(
Date dDate
)
Request Example
View SourceParameters
- dDate
- Type: Date
The date from which to extract the month of the date.
Return Value
Type:
String
The name of the month, where the first letter is uppercase and the rest of the string is lowercase.
For an invalid or NULL_DATE, CMonth() returns a NULL_STRING.
Remarks
CMonth() is a date conversion function useful for creating formatted date strings that can be used in reports, labels, screens, and so on.
This function is nation-dependent.
Examples
These examples illustrate CMonth():
1? CMonth(Today())
2? CMonth(Today() + 45)
3? Substr3(CMonth(Today()), 1, 3) +;
4 Str(Day(Today()))
See Also