Lesson 4.10. Formatting Number, Currency, and Date/Time Fields by Hand
Figure 4-13. The Format property
If none of the ready-made number, currency, or date/time formats meet your needs, you can format your number, currency, and date/time fields the old-fashioned wayby hand. Formatting fields by hand is a laborious and confusing processyou tell Access how you want the field to be formatted by typing the appropriate formatting characters in the Format box. On the other hand, manually formatting a number, currency, or date/time field gives you complete flexibility on how the field displays its information.
In this lesson you will learn how to format number, currency, and date/time fields by hand.
Click the Design button on the toolbar to switch to Design view.
Now you need to click the field you want to format.
Click the Date field.
This time we will specify our own date/time format instead of using one of the Format Property box's ready-made data formats. Formatting number, currency, and date/time fields by hand isn't exactly a difficult process, but you will probably need to use Table 4-5 and Table 4-6 on the next page in order to know which formatting characters to enter.
Click the Format box in the Field Properties section and type ddd mmm d.
Your table should look like Figure 4-13. This will display the date in Sun Mar 8 format. Look at Table 4-5 for a description of the characters you just entered
Click the Save button on the toolbar to save your changes, and then switch to Datasheet view by clicking the View button on the toolbar.
Notice the Date field now displays its days using the Date format you specified.
Close the tblCustomerTours table.
Use the characters in the following table when you want to format number, currency, or date/time characters by hand. You can mix and match any of the following characters. For example, you could add "mmmm" (full name of month) to "yy" (last two digits of the year) to get "January 00."
Table 4-5. Date/Time Formatting Characters
Day in one or two numeric digits
Day in two numeric digits
First three letters of the weekday
Full name of the weekday
Month in one or two digits
Month in two digits
First three letters of the month
Full name of the month
mmmm d, yyyy
March 15, 2000
Last two digits of the year
mmmm d, yyyy
March 15, 2000
Hour in one or two digits
Hour in two digits
Minute in two digits
Second in two digits
Twelve-hour clock (uppercase)
Twelve-hour clock (lowercase)
Table 4-6. Number Formatting Symbols
Display a digit or nothing
Display a digit or 0
Display a decimal separator
Display thousands separator
Display the $ currency symbol
Multiply the value by 100 and add a percent sign
E-, E+, e-, e+
TO MANUALLY FORMAT A DATE/TIME, NUMBER, OR CURRENCY FIELD:
MAKE SURE THE TABLE IS DISPLAYED IN DESIGN VIEW AND CLICK THE FIELD YOU WANT TO FORMAT.
CLICK THE FORMAT BOX IN THE FIELD PROPERTIES SECTION.
ENTER THE APPROPRIATE FORMATTING CHARACTERS OR SYMBOLS FOR HOW YOU WANT THE DATE OR NUMBER TO BE FORMATTED.