# How to extract a date from text in Google Sheets

Find the date with REGEXEXTRACT and convert it: =DATEVALUE(REGEXEXTRACT(A2,"\d{1,2}/\d{1,2}/\d{4}")), formatted as a date.

**Google Sheets:** `=DATEVALUE(REGEXEXTRACT(A2,"\d{1,2}/\d{1,2}/\d{4}"))`

**Excel:** Excel 365 has REGEXEXTRACT, and the same formula works there. In older versions, cut the date out after a fixed word, for example =DATEVALUE(TRIM(MID(A2,FIND("on ",A2)+3,10))).

## Example

Sample data (row 1 is the header):

| A | B |
| --- | --- |
| Note | Date |
| Invoice 1042 paid on 3/14/2026 by card |  |
| Delivered 4/2/2026 |  |
| Renewal due 12/31/2026, notify customer |  |
| Call back 7/1/2026 after 2pm |  |
| Signed 9/30/2026 |  |

Formula in B2, filled to B6: `=DATEVALUE(REGEXEXTRACT(A2,"\d{1,2}/\d{1,2}/\d{4}"))`

Result: 3/14/2026; 4/2/2026; 12/31/2026; 7/1/2026; 9/30/2026

## How it works

The pattern matches one or two digits, a slash, one or two digits, a slash and four digits, wherever the date sits in the note. REGEXEXTRACT returns it as text, and DATEVALUE turns that into a real date, which the date format displays.

## Other ways

- `=IFERROR(DATEVALUE(REGEXEXTRACT(A2,"\d{1,2}/\d{1,2}/\d{4}")),"")`: Leaves notes without a date blank instead of showing #N/A.

## Common mistakes

- DATEVALUE reads the text using the spreadsheet's locale. With a UK locale, 4/2/2026 is 4 February. Check File > Settings.
- The result is a number until the cell is formatted as a date.

## Questions

**How do I extract ISO dates like 2026-03-14?**

Change the pattern: `=DATEVALUE(REGEXEXTRACT(A2,"\d{4}-\d{2}-\d{2}"))`.

**How do I get the date as text instead?**

Leave out DATEVALUE: `=REGEXEXTRACT(A2,"\d{1,2}/\d{1,2}/\d{4}")`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/extract-a-date-from-text-in-google-sheets
