MonthName

Return a string representing the month.

Syntax
      Month(month_number, [abbreviate] ))

Key
   month_number  A value from 1 to 12, representing the month.


   abbreviate    A boolean value, either TRUE or FALSE.
                 If set to TRUE, the month name will be abbreviated.
                 If set to FALSE, the month name is returned in full.

The strings returned by MonthName() will vary according to your Windows regional settings (language.)

The MonthName() function can be used in VBA or in an SQL query.

Examples

Dim strDemo as String
strDemo = Monthname(12)
strDemo = MonthName(month(date))

‚ÄúThirty days hath September, April, June, and November; All the rest have thirty-one, Excepting February alone, And that has twenty-eight days clear; And twenty-nine in each leap-year.”

Related

Day - Return the day of the month.
DatePart - Return part of a given date.
Year - Return the year for a given date.


 
Copyright © 1999-2024 SS64.com
Some rights reserved