totn Access

MS Access 2007: Define a custom format for a Date/Time field in a table

This MSAccess tutorial explains how to define a custom format for a date/time field in a table in Access 2007 (with screenshots and step-by-step instructions).

Question: In Microsoft Access 2007, I have a table with a date field in it. When I view the table, I'd like to see the date value displayed as "mm/dd/yyyy hh:nn:ss" format. How can I do this?

Answer: In Access, you can use the Format property to customize how a date will appear in a table.

To create a custom date format on a field, open your table in Design view by right-clicking on the table name in the left window and selecting Design View from the popup menu.

Microsoft Access

Then select the date field, and set the Format property that you'd like to appear in the field. For example, if you wanted to view the date as "01/31/2005 21:00:00", set the Format property to:

mm/dd/yyyy hh:nn:ss

In this example, we've set the Format property for the OrderDate field.

Microsoft Access

If you wanted to view the date as "01/31/2005 9:00:00 PM", you would set the Format property as follows:

mm/dd/yyyy hh:nn:ss AM/PM

Microsoft Access