How to Convert Date to Number in Excel

To convert a date to a number in Excel, you can simply use the formatting options or use a formula. Here are the two methods:

Method 1: Using Formatting Options

  1. Select the cell or range of cells containing the dates you want to convert to numbers.
  2. Right-click on the selected cells and choose "Format Cells" from the context menu.
  3. In the Format Cells dialog box, go to the "Number" tab.
  4. In the "Category" list, select "General" or "Number" to convert the date to a number. You can also adjust the number of decimal places if needed.
  5. Click "OK" to apply the changes. The dates will now be converted to numbers.

Method 2: Using a Formula

  1. In an empty cell, type the following formula: =DATEVALUE(A1) or =A1*1, where A1 is the cell reference containing the date you want to convert to a number.
  2. Press Enter to apply the formula. The cell will now display the date as a number.
  3. If you want to convert more dates, simply copy the formula to other cells or use the fill handle to apply the formula to a range of cells.

Example

Here's an example to illustrate the formula method:

  1. Suppose you have a date in cell A1: 12/31/2021
  2. In cell B1, enter the formula: =DATEVALUE(A1) or =A1*1
  3. Press Enter. Cell B1 will now display the number 44548, which represents the date 12/31/2021 in Excel's serial number format.

Remember that Excel stores dates as serial numbers, where 1 represents January 1, 1900, and each subsequent number represents the next day. So, when you convert a date to a number, you're actually getting the number of days since January 1, 1900.

Did you find this useful?