Microsoft Office Tutorials and References
In Depth Information
Access Data Types
For example, the Danish cereal company could use a format string like this to show
the U.S. currency symbol:
Whereas a U.S. company that needs to display a Danish currency field (which
formats prices like kr 342.99 ) would use this:
kr #,###.##
Note: Enterprising users can fiddle around with the number format to add extra text, change the number
of decimal places (just add or remove the # signs), and remove the thousands separators (just take out
the comma).
Access uses the Date/Time data type to store a single instant in time, complete with
the year, month, day, and time down to the second. Behind the scenes, Access stores
dates as numbers, which lets you use them in calculations.
Although Access always uses the same amount of space to store date information in a
field, you can hide some components of it. You can choose to display just a date (and
ignore time information) or just the time (and ignore date information). To do this,
you simply need to set the Format field property. Table 26-3 shows your options.
Table 26-3. Date/time formats
General Date
2/23/2010 11:30:15 PM
Long Date
February 23, 2010 11:30:15 PM
Medium Date
Short Date
Long Time
11:30:15 PM
Medium Time
11:30 PM
Short Time
Note: Both the General Date and Long Date formats show the time information only if it’s not zero.
The format affects only how the date information is displayed—it doesn’t change
how you type it in. Access is intelligent enough to interpret dates correctly when you
type any of the following:
• 2010-2-23 (the international year-month-day standard always works)
• 2/23/2010 (the most common approach, but you might need to flip the month
and day on non-U.S. computers)
Search JabSto ::

Custom Search