You are learning Functions and Formulas in MS Excel
How do I convert text to dates with DATEVALUE?
Here's how to convert text to dates with the DATEVALUE function in Excel:
1. Identify the Text and Destination Cell:
- Locate the cell containing the text you want to convert to a date.
- Decide on an empty cell where you want the converted date to appear.
2. Use the DATEVALUE Function:
- In the destination cell, type the formula `=DATEVALUE(text_cell)`.
- Replace `text_cell` with the actual cell reference containing your text date (e.g., A1 if your text date is in cell A1).
3. Press Enter and Apply Formatting (Optional):
- Press Enter to execute the formula. Excel will convert the text to a serial number representing the date.
- Since the result appears as a number, you might want to format the cell to display it as a readable date. Right-click on the cell, select "Format Cells," choose the desired date format (e.g., Short Date), and click "OK."
Example:
Let's say your text date is "30-Oct-2023" in cell A1. In cell B1, you would enter the formula `=DATEVALUE(A1)`. Pressing Enter will convert the text to a serial number (likely around 45000), representing October 30th, 2023. You can then format cell B1 as a Short Date to display "10/30/2023".
Tips:
- Ensure your text date format is compatible with Excel's date recognition. Common formats like DD-MMM-YYYY or MMM-DD-YYYY usually work well.
- DATEVALUE only converts text to a date; it doesn't inherently change the original text data. The original text remains unchanged.