Microsoft Office Tutorials and References
In Depth Information
Access Data Types
• 23-Feb-10
• Feb 23 (Access assumes the current year)
• 23 Feb (ditto)
To add date and time information, just follow the date with the time, as in
23-Feb-10 5:06 PM. Make sure to include the AM/PM designation at the end, or
use a 24-hour clock.
If it’s too much trouble to type in a date, then consider using the calendar smart tag
instead. The smart tag is an icon that appears next to the field whenever you move to
it, as shown in Figure 26-12. You can turn this feature off by setting the Show Date
Picker field property to Never.
Up to speed
Dating Your Computer
Windows has regional settings for your computer, which
affect the way Microsoft programs display things like dates
and currencies. In Access the regional settings determine
how the different date formats appear. In other words, on a
factory-direct U.S. computer, the Short Date format shows
up as 2/23/2010. But on a British computer, it may appear
as 23/2/2010. Either way, the information that’s stored in
the database is the same. However, the way it appears in
your datasheet changes.
the Control Panel option on the right side.) Once you’ve
opened the Control Panel, double-click “Region and
Language”, which brings up a dialog box. The first tab has all
the settings you want. The most important setting is in the
first box, which has a drop-down list you can use to pick the
language and region you want to use, like English (United
States) or Swedish (Finland).
You can fine-tune the settings in your region, too. This
makes sense only if you have particular preferences about
how dates should be formatted that don’t match the
standard options. To do so, you click a button whose name
varies depending on your operating system. In Windows XP
click the Customize button; in Windows Vista look for the
“Customize this format” button; and in Windows 7, click
the Additional Settings button. Then, click the Date tab in
the new dialog box that appears (Figure 26-13).
You can change the regional settings, and they don’t have
to correspond to where you live—you can set them for your
company headquarters on another continent, for instance.
But keep in mind that these settings are global, so if you
alter them, you affect all your programs.
To make a switch, head to Control Panel. (In Windows XP,
click the Start menu and choose Settings➝Control Panel.
In Windows Vista or Windows 7, click Start and look for
Custom date formats
If you’re not happy with the seven standard date options that Access provides, you
can craft your own date format string and type in the Format property. This format
string tells Access how to present the date and time information.
A date format string is built out of pieces. Each piece represents a single part of the
date, like the day, month, year, minute, hour, and so on. You can combine these
pieces in whatever order you want. For example, consider the following format string:
Search JabSto ::

Custom Search