How to Convert a Date in Access to YYYYMMDD

By Lysis

A Microsoft Access database is used to hold data in tables and retrieve the information using queries. The Microsoft Access database holds tables, queries and reports. When creating a report, you may want to format the date layout. You can format a date layout in Access to display it as "yyyy/mm/dd." Access has a pre-designed statement called the "Format()" function, which lays out the text according to the string input.

Step 1

Double-click the Microsoft Access database file. This opens the file and automatically loads the Access application.

Step 2

Click the "Queries" icon on the main menu. This window lists all the queries programmed into the Access database. Right-click the query name you want to edit and select "Design View." This opens the query editor.

Step 3

Locate the date field in the list of return data in the bottom of the screen. If the field has not been added yet, drag and drop the field from the table to the bottom of the screen.

Step 4

Use the "Format()" function to format the date field in the "yyyy/mm/dd" layout by adding it to the field name. For instance, if you have the field "my_date" returned in the query, edit the field name to the following:Format ([my_date], "yyyy/mm/dd")The brackets around "my_date" indicate a table field, and the string included is the layout for the date.

Step 5

Save the query and close the design viewer. You're returned to the list of queries. Double-click the query. The query is executed and the results are shown with the formatted date.