Salesforce

CMonth (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

CMonth (Magic xpa 3.x)

Returns the name of the month (e.g., January, February) from a date or a date expression.

Syntax:

CMonth(date)

Parameters:

date: A date or a date expression.

Returns:

Alpha string

Example:

CMonth('01/28/92'DATE) returns 'January'
If X contains, in effect, the date 01/28/92, then CMonth(X+30) returns 'February'

Note:

The use of DATE following '01/28/92' identifies the string as a DATE literal string, and should not be confused with the Date() function.

You can control the length of the month name by manipulating the length of the Alpha variable that will hold it. For example, if you input the result of a CMonth operation to a 3-character Alpha variable, Magic xpa displays the first three letters of the month name (e.g., 'Jan', 'Feb').

See also:

Month, NMonth

How Do I Retrieve the Name of the Month of a Given Day?

The Online and Rich Client Samples projects (program DT13, DT20, RDT13 and RDT20)

Reference
Attachment 
Attachment