Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Conditional Formatting Rules in Excel
  • Reverse List in Excel
  • Excel Frequency Function Example
  • Data Series in Excel
  • Move chart to a separate worksheet in Excel

References

  • How to get address of first cell in range in Excel
  • Count rows that contain specific values in Excel
  • Two-column Lookup in Excel
  • How to get last row in numeric data in Excel
  • Count unique text values with criteria

Data Validations

  • Excel Data validation no punctuation
  • Excel Data validation number multiple 100
  • Excel Data validation must contain specific text
  • Excel Data validation require unique number
  • Excel Data validation must begin with

Convert text to date in Excel

by

This tutorial show how to Convert text to date in Excel using the example below.

To convert text in an unrecognized date format to a proper Excel date, you can parse the text and assemble a proper date with a formula based on several functions: DATE, LEFT, MID, and RIGHT.

Note: Before you go the formula route, see below for other ways you might be able to get Excel to recognize text as dates without formulas.

Formula

=DATE(LEFT(text,4),MID(text,5,2),RIGHT(text,2))

Explanation of how this formula works

 

In the example shown, the formula in C6 is:

=DATE(LEFT(B6,4),MID(B6,5,2),RIGHT(B6,2))

This formula extract the year, month, and day values separately, and uses the DATE function to assemble them into the date October 24, 2000.

Worked Example:   Extract word that begins with specific character in Excel

Background

When you’re working with data from another system, you might run into text values that represent dates, but are not understood as dates in Excel. For example, you might have text values like this:

Text Date represented
20001024 October 24, 2000
20050701 July 1, 20115
19980424 April 24, 1998
28.02.2014 February 28, 2014

Excel won’t recognize these text values as a date, so in order to create a proper date, you’ll need parse the text into it’s components (year, month, day) and use these to make a date with the DATE function.

The DATE function takes three arguments: year, month, and day. The LEFT function extracts the leftmost 4 characters and supplies this to DATE as the year. The MID function extracts characters 5-6 and supplies this to DATE as the month, and the RIGHT function extracts the rightmost 2 characters and supplies these to DATE as the day. The final result is a proper Excel date that can be formatted any way you like.

Worked Example:   Add years to date in Excel

Another example

In row 8, the (unrecognized) date format is dd.mm.yyyy and the formula in C8 is:

=DATE(RIGHT(B8,4),MID(B8,4,2),LEFT(B8,2))

Text to columns to fix dates

Another way to get Excel to recognize dates is to use the Text to Columns Feature:

Select the column of dates, then try Data > Text to columns > Fixed > finish

This can sometimes fix everything at once.

Add zero to fix dates

Sometimes, you’ll encounter dates in a text format that Excel should recognize. In this case, you might be able to force Excel to convert the text values into dates by adding zero to the value. When you add zero, Excel will try to coerce text values to numbers. Since dates are just numbers, this trick is a great way to convert dates in text format that Excel really should understand.

Worked Example:   How to generate series of dates increment by 1 year from a single start date in Excel

To convert dates in place by adding zero, try Paste Special:

  1. Add a zero to an unused cell and copy to the clipboard
  2. Select the problematic dates
  3. Paste Special > Values > Add

To convert dates by adding zero in a formula, use:

=A1+0

where A1 contains an unrecognized date.

Post navigation

Previous Post:

Number and Text Filters Examples in Excel

Next Post:

Convert date string to date time in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • How to use Excel OR Function
  • IF, AND, OR and NOT Functions Examples in Excel
  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • Nested IF function example in Excel
  • IF function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • How to calculate working days left in month in Excel
  • Convert date to month and year in Excel
  • Calculate expiration date in Excel
  • Roll back weekday to Friday base on a particular date in Excel
  • Steps to create Dynamic calendar grid in Excel

Grouping

  • Group times into unequal buckets in Excel
  • Group numbers at uneven intervals in Excel
  • How to randomly assign people to groups in Excel
  • If cell contains one of many things in Excel
  • Categorize text with keywords in Excel

General

  • 44 Practical Excel IF function Examples
  • Share Excel data with Word documents
  • 231 Keyboard Shortcut Keys In Excel
  • How to calculate total from percentage in Excel
  • How to fill cell ranges with random number from fixed set of options in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning