Home page
or browse popular tags
Access Functions

Sign up for the free email newsletter for new tips, tutorials and more. Enter your email address below, and then click the button.

Privacy Policy

RSS Twitter

Access: MonthName Function


In Access, the MonthName function returns a string containing the specified month.

The syntax for the MonthName function is:

MonthName ( month [, abbreviate] )

The required month argument is a value from 1 to 12, representing the month. The abbreviate argument is optional. It accepts a boolean value, that indicates if the month name is to be abbreviated. If omitted, the default is False, which means that the month name is not abbreviated.


MonthName (5)               returns 'May'
MonthName (5,False)       returns 'May'
MonthName (1,True)        returns 'May'

VBA Code

Dim MyMonth As Integer 
MyMonth = MonthName(3,False)

This example uses the MonthName function to obtain the months name from a specified month.  Now the MyMonth variable would contain the value of 'March'.

SQL query

You can also use the MonthName function in a query.

SELECT MonthName(1,True) AS Expr1
FROM Orders


You cannot test this function online. It works in Access only.


Add To: Add to dzone dzone | Digg this digg | Add to del.icio.us del.icio.us | Stumble it stumbleupon

  • Comments

Copyright © 2005-2023             www.WebCheatSheet.com All Rights Reserved.