# 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

- Select the cell or range of cells containing the dates you want to convert to numbers.
- Right-click on the selected cells and choose "Format Cells" from the context menu.
- In the Format Cells dialog box, go to the "Number" tab.
- 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.
- Click "OK" to apply the changes. The dates will now be converted to numbers.

## Method 2: Using a Formula

- 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. - Press Enter to apply the formula. The cell will now display the date as a number.
- 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:

- Suppose you have a date in cell A1:
`12/31/2021`

- In cell B1, enter the formula:
`=DATEVALUE(A1)`

or`=A1*1`

- 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?