Convert number stored as a text to date in Excel and Google Sheets

=DATE(RIGHT(A2,4),MID(A2,3,2),LEFT(A2,2))

A2 = data cell

Check below for a detailed explanation with pictures and how to use formulas in Excel and Google Sheets.

Convert number stored as a text to date in Excel

How to convert a number stored as a text to date in Excel?
Convert number stored as a text to date in Excel

CONVERT NUMBER STORED AS A TEXT TO DATE — EXCEL FORMULA AND EXAMPLE

  1. =DATE(RIGHT(B2,4),MID(B2,3,2),LEFT(B2,2))

    • B2 = data cell format DDMMYYY

  2. =DATE(RIGHT(B3,4),LEFT(B3,2),MID(B3,3,2))

    • B3 = data cell format MMDDYYYY

  3. =DATE(LEFT(B4,4),MID(B4,5,2),RIGHT(B4,2))

    • B4 = data cell format YYYYMMDD

  4. =DATE(LEFT(B5,4),RIGHT(B5,2),MID(B5,5,2))

    • B4 = data cell format YYYYMMDD

Convert number stored as a text to date in Google Sheets

How to convert numbers stored as text to date in Google Sheets?
Convert number stored as a text to date in Google Sheets

CONVERT NUMBER STORED AS A TEXT TO DATE — GOOGLE SHEETS FORMULA AND EXAMPLE

  1. =DATE(RIGHT(B2,4),MID(B2,3,2),LEFT(B2,2))

    • B2 = data cell format DDMMYYY

  2. =DATE(RIGHT(B3,4),LEFT(B3,2),MID(B3,3,2))

    • B3 = data cell format MMDDYYYY

  3. =DATE(LEFT(B4,4),MID(B4,5,2),RIGHT(B4,2))

    • B4 = data cell format YYYYMMDD

  4. =DATE(LEFT(B5,4),RIGHT(B5,2),MID(B5,5,2))

    • B4 = data cell format YYYYMMDD