Click or drag to resize

CMonth Function

Extract the name of the month from a date.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax
 FUNCTION CMonth(
	dDate AS DATE
) AS STRING
View Source

Parameters

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():
X#
? CMonth(Today())                                        // September
? CMonth(Today() + 45)                                // October
? Substr3(CMonth(Today()), 1, 3) +;
        Str(Day(Today()))                        // Sep 1
See Also