CMONTH( ) Function

Returns the name of the month from a given date or DateTime expression.

CMONTH(dExpression | tExpression)

Parameters

  • dExpression
    Specifies the date expression from which CMONTH( ) returns the name of the month.
  • tExpression
    Specifies the DateTime expression from which CMONTH( ) returns the name of the month.

Return Value

Character

Remarks

CMONTH( ) returns the name of the month as a string in proper noun format based on the current resource file you are using and not on the Windows locale. For more information, see Managing Files in an International Application.

Example

? CMONTH(DATE( ))
STORE {^1998-02-16} TO gdDueDate
? 'Your payment was due in ', CMONTH(gdDueDate)
STORE gdDueDate+60 TO gdFinalDate
? 'You must pay by ', CMONTH(gdFinalDate)

See Also

Reference

DMY( ) Function
MDY( ) Function
MONTH( ) Function
DATETIME( ) Function

Other Resources

Functions
Language Reference (Visual FoxPro)