Microsoft Office Tutorials and References
In Depth Information
Access Data Types
This string translates as the following instructions: “Display the four-digit year,
followed by a dash, followed by a two-digit month number, followed by another dash,
followed by a two-digit day number.” You’re free to put these components in any
order you like, but this example defines them according to the ISO date standard.
You can also control how to display the year, day, and month components. You can
use month abbreviations or full names instead of a month number (just replace the
mm code with something different).
If you apply this format string to a field that contains the date January 1, 2010, then
you see this in the datasheet:
Remember that regardless of what information you choose to display or hide,
Access stores the same date information in your database. Table 26-4 shows the basic
placeholders that you can use for a date or time format string.
Table 26-4. Date and time formatting codes
Displays (January 1, 2010,
The day of the month, from 1 to 31, with the
numbers between 1 and 9 appearing without a
The day of the month, from 01 to 31 (leading 0
included for 1 to 9).
A three-letter abbreviation for the day of the
The full name of the day of the week.
The number value, from 1 to 12, of the month
(no leading 0 used).
The number value, from 01 to 12, of the month
(leading 0 used for 01 to 09).
A three-letter abbreviation for the month.
The full name of the month.
A two-digit abbreviation of the year.
The year with all four digits.
The hour, from 0 to 23 (no leading 0 used).
The hour, from 00 to 23 (leading 0 used for 00
The minute, from 0 to 59 (no leading 0 used).