TODAY, NOW, DATE, and DATEVALUE Date Functions
Using several of the simple date functions offered on the Date and Time button's drop-down menu on the Ribbon's Formulas tab.
- Open the Exercise8-2.xlsx workbook file in your Chap8 folder in your Excel 2007 Workbook folder.
This workbook contains a Date Formulas worksheet that you can use to practice building formulas with several of Excel's Date functions. - With cell cursor in cell B1, click the Date and Time button on the Ribbon's Formulas
tab or press Alt+ME and then click TODAY on its drop-down menu.
Excel inserts the =TODAY() formula in cell B1 and displays its Function Arguments dialog box. This dialog box explains that this particular function takes no arguments. - Click OK in the Function Arguments dialog box or press Enter.
Excel enters the current date into cell B1 formatted as 4/5/2008. - Click cell D1 in the Date Formulas worksheet, and then select the NOW function on
the Date and Time button's drop-down menu and click OK in its Function Arguments dialog box.
Excel inserts the current date and time in cell D1 in the format 4/5/2008 9:10. - Press Ctrl+1 to open the Format Cells dialog box. Then, click Time in the Category
pane and click the 1:30 PM sample in the Type list box before you click OK.
Excel formats the current date and time in cell D1 so that only the time is displayed, as in 9:10 AM. - Click cell D3, and then select the DATE function on the Date and Time button's dropdown
menu. Next, designate the numeric entries in cells A3, B3, and C3 of the
worksheet as the Date function's arguments in its Function Arguments dialog box in the following order:
- Click cell C3 when the insertion point is in the Year argument text box
- Press Tab and then click cell A3 for the Month argument
- Press Tab and then click cell B3 for the Day argument and then click OK
- Use the Fill handle on cell D3 to copy its formula with the DATE function down to the cell range D4:D8.
Note that contents of the cell range D3:D8 is composed of DATE function formulas rather than date serial numbers. To convert these formulas to their calculated date values, you will copy them to the Clipboard and then paste their values in column E to the right, using the Paste Values option on the Paste button's drop-down menu. - Leave the cell range D3:D8 selected and then press Ctrl+C to copy this range to the Clipboard.
Excel places a marquee around the cell range D3:D8. - Click cell E3 and then press Alt+HVV to select the Paste Values option on the Home
tab's Paste button's drop-down menu.
Excel copies the date serial numbers into the range E3:E8. Note that the date serial numbers copied into this cell range are completely static: Unlike the DATE function formulas in the cell range D3:D8, revising the numeric entries made in the cells in the range A3:C8 would have no effect on them. - Use the Format Cells dialog box (Ctrl+1) to format these date serial numbers in cell
range E3:E8 with the Date number format that uses the sample 14-Mar-01.
Next, you'll use the DATEVALUE function to convert the date entries in the cell range A10:A14 of the Date Formulas worksheet that have been entered as text (prefaced with an apostrophe) to their corresponding date serial numbers. - Click cell B10 and then select the DATEVALUE function on the Date and Time button's
drop-down menu. Click cell A10 to enter this cell address as the Date_Text argument
in the Function Arguments dialog box and click OK.
Excel displays the calculated date serial number 32546 in cell B10. - Use the Fill handle to copy this DATEVALUE formula in cell B10 down to the cell
range B11:B14 and then use Format Cells dialog box (Ctrl+1) to format these date
serial numbers with the Date number format that uses the sample 14-Mar-01.
Now, you are ready to save your work in the Date Formulas worksheet. - Position the cell cursor in cell F3 of the Date Formulas sheet and save a copy of the workbook with the filename Date Function Practice.xlsx in your Excel 2007 Practice folder, and leave the workbook open for Exercise 8-3.
In this tutorial:
- Date and Time Formulas in Excel
- Constructing Date and Time Formulas
- Building Formulas that Calculate Dates and Times
- Working with Simple Date Functions
- TODAY, NOW, DATE, and DATEVALUE Date Functions
- Working with Excel's More Date Functions
- WEEKDAY, WEEKNUM, and YEARFRAC Date Functions
- Working with the Time Functions
- Building Formulas with Common Time Functions