![](https://csdnimg.cn/release/download_crawler_static/2390603/bg13.jpg)
GETTING STARTED WITH EXCEL
1
5
NUMERIC (CONTINUED)
Dates and Time
Excel uses the Western, formally called Gregorian,
calendar as a basis for all dates and times, and stores
them as a combined number. Dates are all sequential,
whole numbers from 1 to 2958465. Excel stores times,
which are all portions of the dates, as decimal values.
For example, if you type the value 12/05/02 4:00 PM in a
cell, Excel stores it as the numeric value 37595.66667,
where 37595 represents the date portion, and .66667
represents the time.
You can apply any mathematical calculations to
compare and manipulate dates and time. For example,
you can add, subtract, or determine the elapsed time
between two dates and times. The cell's formatting
determines how the date or time value displays.
Dates
Although a date displays in a cell on your worksheet,
Excel actually stores its numeric equivalent. Using the
Western calendar, Excel determines the number of days
in each month. For example, January always has 31 days,
and February has 28 days with the exception of leap year.
Excel for Windows bases all dates on what is commonly
referred to as the 1900 date system, which recognizes
1/1/1900 as the first date with a stored value of 1. The
last date that Excel recognizes is December 31, 9999 or
12/31/9999, which it stores as 2958465. If you use Excel
on a Macintosh computer, dates are based on a 1904
date system, which means 1/1/1904 has a value of 1 and
12/31/9999 has a value of 2957003.
Although the two operating systems use different date
systems, you can convert them when moving
worksheets between a Windows and a Macintosh
computer. If you open a Macintosh-created Excel
(version 2.0 or later) worksheet in Windows, the dates
automatically convert to the 1900 date format. Likewise,
opening a Windows-created worksheet on a Macintosh
converts dates to the 1904 system. You can also
manually force the date conversion in Excel for
Windows by selecting the 1904 date system option on
the Calculation tab of Options dialog box.
If you decide to use two-digit dates in Excel, you must
exercise caution when entering them. Excel interprets
two-digit years between 00 and 29 as the years 2000
though 2029. Excel interprets two-digit years between
30 and 99 as 1930 to 1999. To avoid errors, consider
always using a four-digit year.
Time
Excel stores all time values as decimal values between 0
and 0.99999999, with 12:00 midnight being 0, and
11:59:59 PM being 0.99999999. So a time that displays as
12:00 P.M. (noon) has a value of 0.5.
By default, Excel bases all times on a 24-hour clock,
commonly known as military time. This means that if
you enter 10:30 without an A.M. or P.M., Excel assumes
you mean 10:30 A.M. If you want 10:30 P.M., enter P.M.
after the time, or use the corresponding 24-hour clock
value of 22:30.
Formula
You can create formulas within any cell of a worksheet
to evaluate data values in other cells within your
worksheet. For example, the following formula adds the
numeric values in cells A1 through A10 and displays the
total in the cell containing the formula.
=SUM(A1:A10)
You must always precede formulas with an equal sign,
which signals that what follows is a formula that Excel
needs to evaluate. You can use any of the built-in
functions, mathematical operators, constant values, and
cell references to create a formula. Although you can
use any combination of elements in a formula, the total
number of characters in the formula cannot exceed
1,024 characters.
Excel formats a cell based upon the resulting value of
the formula. For example, most formulas return a
numeric value; therefore, by default, Excel right-justifies
the returned value of numeric formula cells like other
numeric cells. See Chapter 4 for more information
about creating formulas in your worksheets. For more
on formula basics, see Appendix D.
02 537547 Ch01.qxd 3/4/03 11:45 AM Page 5