Direct Answer: Convert Standard Date Text With DATEVALUE
When a date is stored as text, formulas like MONTH(), EOMONTH(), or date-range SUMIFS can behave unexpectedly. Use DATEVALUE on clean text dates:
=DATEVALUE(A2)
Worked Example: Text Dates vs. Real Dates
| Cell A2 (Text Input) | =DATEVALUE(A2) Result |
Display After Date Format |
|---|---|---|
"2026-11-26" |
Real date serial value | 2026-11-26 (or Nov 26, 2026) |
"Nov 26, 2026" |
Real date serial value | 2026-11-26 |
Fixing Non-Standard or Messy Imported Date Strings
- Extra spaces around a date string: Clean spaces first with TRIM—for example,
=DATEVALUE(TRIM(A2)). - Ambiguous day/month order across regions: If a CSV uses
DD/MM/YYYYon a system expectingMM/DD/YYYY(or vice versa), split the parts with TEXTSPLIT /SPLITor construct explicit dates withDATE(year, month, day)so day and month never swap silently. - Always apply a Date number format: After converting, format the cell as a Date so it reads as a calendar date rather than a number.
Next Step: Once your dates are real dates, calculate month-end cutoffs with EOMONTH or count business days with
NETWORKDAYS.