Page 274 - Excel 2007 Bible
P. 274
18_044039 ch13.qxp 11/21/06 11:05 AM Page 231
Description
Function
Returns the serial number of the date that represents the indicated number of months before or
EDATE*
after the start date
EOMONTH*
Returns the serial number of the last day of the month before or after a specified number of
months
MONTH
Converts a serial number to a month
Returns the number of whole work days between two dates
NETWORKDAYS*
NOW
Returns the serial number of the current date and time
Returns the serial number of today’s date
TODAY
Converts a serial number to a day of the week
WEEKDAY
WEEKNUM*
Returns the week number in the year
Returns the serial number of the date before or after a specified number of workdays
WORKDAY*
YEAR
Converts a serial number to a year
YEARFRAC*
Returns the year fraction representing the number of whole days between start_date and
end_date Working with Dates and Times 13
* In versions prior to Excel 2007, these functions are available only when the Analysis ToolPak add-in is installed.
Displaying the current date
The following function displays the current date in a cell:
=TODAY()
You can also display the date combined with text. The formula that follows, for example, displays text, such
as Today is Monday, April 9, 2007.
=”Today is “&TEXT(TODAY(),”dddd, mmmm d, yyyy”)
It’s important to understand that the TODAY function is updated whenever the worksheet is calculated. For
example, if you enter either of the preceding formulas into a worksheet, the formulas display the current
date. But when you open the workbook tomorrow, they will display the current date (not the date when
you entered the formula).
TIP To enter a date stamp into a cell, press Ctrl+; (semicolon). This action enters the date directly
TIP
into the cell and does not use a formula. Therefore, the date will not change.
Displaying any date
You can easily enter a date into a cell by simply typing it while using any of the date formats that Excel rec-
ognizes. You can also create a date by using the DATE function, which takes three arguments: the year, the
month, and the day. The following formula, for example, returns a date comprised of the year in cell A1, the
month in cell B1, and the day in cell C1:
=DATE(A1,B1,C1)
231