How to Convert a Date to a Month in Access

Microsoft Access is a database application you can use to develop reports and display data from tables. When you have dates in tables, you can calculate the month directly from the date entered. Microsoft Access has a built-in function that automatically calculates the month and returns an integer. The integer represents the number for the month of the year. You can set the calculation using the "Month()" function in the Access query.

Instructions

    • 1

      Double-click the Access database file you want to edit. This loads the file along with the Access application.

    • 2

      Click the "Queries" icon in the main menu. This opens a list of queries programmed in the Access database.

    • 3

      Right-click the query you want to edit and select "Design View." This opens the query in the Access wizard.

    • 4

      Drag and drop the date field from the tables at the top of the window to the matrix at the bottom. Access automatically displays the date field name in the list of data.

    • 5

      Edit the field name text box by surrounding it with the "Month()" function. For example, if you have a date field named "Birthdate," use the following syntax:

      Month([Birthdate])

      The brackets indicate a table field. With the month function surrounding the field name, the data seen after running the query is an integer from 1 to 12.

    • 6

      Save the query and close the design viewer. This brings you back to the list of queries. Double-click the query name, which runs the query. The data displayed in the query results is the month number.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured