Pages

Wednesday, December 21, 2011

Showing the current date and time in a worksheet cell (Excel 2000/2001/2002/2003/2007)

Sometimes there's an advantage to storing the current date or time in a Excel's worksheet cell. For instance, the worksheet's layout may lend itself to showing the date inline with the data, as opposed to in the header section. Or, your worksheet may use date-based formulas that process data according to the current date and time. Regardless of the reason, it's easy to create cells that display the current date and time.

To show the current day, just enter the following formula in a cell:
=TODAY()

To show the current date and time together, enter the formula:
=NOW()

You can change how the date and time appear by changing the cell's number format. For instance, you can format the NOW function result so that only the time portion is shown. To change the formatting, select the cell and choose Format | Cells from the menu bar. Then, click on the Number tab and select a format type from the Date or Time categories.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.