Right click the table header and switch to the Design view. Open the table in Datasheet view, click the down arrow next to Click to Add column, and select Date & Time from the drop down field list. If you don't already have a date and time field, add the field. The default format is the General Date format - m/dd/yyyy h:mm:ss AM/PM. To select a different month and day, use the forward or back buttons.Īccess provides several predefined formats for the date and time data, but if these formats do not meet your needs you can specify a custom format. To select a day in the current month, click the date. To add dates to the field, just click the Date Picker or calendar icon and do one of the following: Open the table where you want to insert the Date/Time field in Datasheet view.Ĭlick the down arrow next to Click to Add column and select Date & Time from the drop down field list. Top of Page Add a Date/Time field to a table
9999, or 23:59:59.įor more information on the date/time data type, see the article Introduction to data types and field properties. For example, if you enter an invalid date, such as, a message appears and you would have the option of entering a new value or converting the field from the Date/Time data type to the Text data type. Īccess automatically provides a certain level of data validation related to date and time formatting. For example, you can enter a date in a European format such as, and have the table, form, or report display the value as. The display format that you select will not affect how the data is entered or how Access stores that data. It is possible to change these automatic formats by using custom display formats. In the United States, you would see 12:07:12 PM. For example, in Europe and many parts of Asia, depending on your location, you might see the date and time as 12:07:12 PM or 12:07:12 PM.
These automatic formats for dates and times vary depending on the geographic location specified in the Microsoft Windows Regional and Language Options setting on your computer. The time is displayed as, hh:mm:ss AM/PM, where hh is the hour, mm is minutes, and ss is seconds but you can display the date and time in several formats. were mm is the month, dd is the day, and yyyy is the year. The dates appear as, mm/dd/yyyy in the U.S. Restrict date and time entry format by using an input maskĪdditional information Overview of date and time formatsĪccess automatically displays the date and time in the General Date and Long Time formats.
This article briefly explains the Date/Time data type, how to add a date and time field to a table and how you can apply a predefined or custom format. When you use the Date/Time data type in Microsoft Access, you have the option to keep the default formats, apply a predefined format, or create a custom format.