How to standardize dates in Google Sheets
Dates pasted from forms, banks or other countries often arrive as text, or mix 03/04/2026 (March 4 or April 3?) with 2026-04-03. Sorting and filtering break until they are real dates.
Step 1: check the spreadsheet locale
File → Settings → Locale decides whether 03/04/2026 is read as day/month or month/day. Set it to match the source before converting.
Step 2: convert text to real dates
=IFERROR(DATEVALUE(TRIM(A2)),"CHECK") converts most text dates using the locale.
Step 3: force day/month/year when the locale disagrees
=LET(p,SPLIT(REGEXREPLACE(TRIM(A2),"[-.]","/"),"/"),DATE(INDEX(p,3),INDEX(p,2),INDEX(p,1))) reads 31-12-2026 or 31.12.2026 as December 31. Swap the 2 and 1 for month/day sources.
Step 4: one display format
Select the column and use Format → Number → Custom date and time, or =TEXT(B2,"yyyy-mm-dd") for an ISO text value that every tool understands.
Mixed sources?
When one column mixes both orders, no single formula is safe: rows with a day above 12 are unambiguous, the rest need a rule per source.
DataTools AI