The DATEVALUE guide
=DATEVALUE(A2) reads a date written as text, such as "2026-03-20" or "April 2, 2026", and returns a real date. Real dates sort in order, subtract into days and work in date filters; text dates do none of that.
How to tell a text date
Text sits on the left of a cell by default, numbers and real dates on the right. Other signs: sorting puts "10/1/2026" before "4/9/2026", =ISTEXT(A2) returns TRUE, and the status bar shows a count but no sum when you select the column.
DATEVALUE
=DATEVALUE(A2)
The result is the date's serial number, so give the cell a date format to see it as a date. DATEVALUE reads the layouts your Windows or Mac region settings accept. In the US settings this sheet uses, that is 3/14/2026, 2026-03-14, 14-Mar-2026 and March 14, 2026.
Other ways
=VALUE(A2)and=A2*1do the same for text that looks like a date.- Data → Text to Columns, then Finish, converts a whole column in place.
- When the layout doesn't match your settings, such as 14/03/2026 on a US machine, take it apart:
=DATE(RIGHT(A2,4), MID(A2,4,2), LEFT(A2,2)).
Common mistakes
- Quotes around the cell.
DATEVALUE("A2")tries to read the letters A2. - TEXT instead of DATEVALUE. TEXT turns a value into text, the opposite direction.
- Changing the format only. A date format on a text cell changes nothing: it is still text.
- DATEVALUE on a real date. It returns #VALUE!, because the cell isn't text.
Once they are real dates, subtract them or sort them.
FAQ
- How do I convert text to a date in Excel?
- Use =DATEVALUE(A2) and give the result a date format. =VALUE(A2) and =A2*1 also work for text that looks like a date.
- Why won't my dates sort in order?
- They are probably text: they sort letter by letter. Convert them with DATEVALUE or Data > Text to Columns.
- Why does DATEVALUE return #VALUE!?
- The text isn't in a layout your region settings read as a date, or the cell already holds a real date. Take odd layouts apart with LEFT, MID, RIGHT and DATE.
- How can I tell if a date is text?
- Text sits on the left of the cell and real dates on the right. =ISTEXT(A2) returns TRUE for text.






























































