18.11.2014 Views

Microsoft Office

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Working with Dates and Times 13<br />

Function<br />

EDATE*<br />

EOMONTH*<br />

MONTH<br />

NETWORKDAYS*<br />

NOW<br />

TODAY<br />

WEEKDAY<br />

WEEKNUM*<br />

WORKDAY*<br />

YEAR<br />

YEARFRAC*<br />

Description<br />

Returns the serial number of the date that represents the indicated number of months before or<br />

after the start date<br />

Returns the serial number of the last day of the month before or after a specified number of<br />

months<br />

Converts a serial number to a month<br />

Returns the number of whole work days between two dates<br />

Returns the serial number of the current date and time<br />

Returns the serial number of today’s date<br />

Converts a serial number to a day of the week<br />

Returns the week number in the year<br />

Returns the serial number of the date before or after a specified number of workdays<br />

Converts a serial number to a year<br />

Returns the year fraction representing the number of whole days between start_date and<br />

end_date<br />

* In versions prior to Excel 2007, these functions are available only when the Analysis ToolPak add-in is installed.<br />

Displaying the current date<br />

The following function displays the current date in a cell:<br />

=TODAY()<br />

You can also display the date combined with text. The formula that follows, for example, displays text, such<br />

as Today is Monday, April 9, 2007.<br />

=”Today is “&TEXT(TODAY(),”dddd, mmmm d, yyyy”)<br />

It’s important to understand that the TODAY function is updated whenever the worksheet is calculated. For<br />

example, if you enter either of the preceding formulas into a worksheet, the formulas display the current<br />

date. But when you open the workbook tomorrow, they will display the current date (not the date when<br />

you entered the formula).<br />

TIP<br />

To enter a date stamp into a cell, press Ctrl+; (semicolon). This action enters the date directly<br />

into the cell and does not use a formula. Therefore, the date will not change.<br />

Displaying any date<br />

You can easily enter a date into a cell by simply typing it while using any of the date formats that Excel recognizes.<br />

You can also create a date by using the DATE function, which takes three arguments: the year, the<br />

month, and the day. The following formula, for example, returns a date comprised of the year in cell A1, the<br />

month in cell B1, and the day in cell C1:<br />

=DATE(A1,B1,C1)<br />

231

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!