NOW()

Syntax. NOW()

Definition. This function returns the serial number of the current date and time.

Arguments. None

The NOW() function returns the current date and the current time. Use this function if you need the current time for calculations. If you select the General option for the cell format before you enter the function, the result is formatted as a date.

Background. The related TODAY() function also returns the current date, but not the current time. If you use the NOW() function for calculations—for example, to calculate interest days—the returned time can be inconvenient. Therefore, use the TODAY() function to calculate date differences when only the days are important.

The results of both functions are not updated unless you open the workbook or update any information in the workbook that will automatically perform a recalculation of the sheet. To recalculate a sheet, press the F9 key.

The accuracy of both functions depends on your computer having the correct system time.

See Also

For more information about saving dates in Excel, see the section titled The Excel Date System in Chapter 2.

Example. Suppose you want to include the current date and time in a form. Enter the NOW() function in a cell on the form. =NOW() returns the current date and time based on the system time of your computer. More examples (see Figure 7-6) include the following:

  • =NOW()+1/24 returns the date and time one hour from now.

  • =NOW()+12/24 returns the date and time 12 hours from now.

In Excel 2007 and Excel 2010, you can use conditional formats to chart times.

Figure 7-6. In Excel 2007 and Excel 2010, you can use conditional formats to chart times.

See Also

DATE(), DAY(), HOUR(), MINUTE(), MONTH(), SECOND(), WEEKDAY(), YEAR()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.54.255