O'Reilly logo

Excel 2003: The Missing Manual by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Date and Time Functions

You aren't limited to arithmetic operators for manipulating dates and times. Excel also provides some invaluable ready-to-use functions to help you do things like identify the current date, extract just part of the date, and perform calculations with a date.

TODAY( ) and NOW( ): Inserting the Current Date and Time

The TODAY( ) function automatically retrieves the current date. It doesn't require any arguments because it simply examines your computer's internal clock. The TODAY( ) function is extremely useful for creating spreadsheets that continuously update themselves (sometimes called dynamic spreadsheets ). For example, you could create a formula that determines the number of days a payment is overdue. Here's an example:

=TODAY( )-A1

This formula assumes that cell A1 contains the date a payment was due. As a result, it calculates the number of days between the two dates, which shows up as an ordinary number (like 14 for a payment that's two weeks late). Remember, you'll need to display the result as an ordinary number (representing the number of days), not as a date.

The NOW( ) function is similar to the TODAY( ) function, except it retrieves the current date along with the current time. If you use NOW( ) to display a value in a cell that doesn't have any special formatting applied, Excel will use a custom format that shows the date and time (listed in the 24-hour format; for example, 1/5/2005 19:06.)

You can use other formats to hide some of this information. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required