How to convert date to text in Excel with TEXT function and without formulas

In the previous article, we discussed different ways to convert text to date in Excel. If you are looking for a solution to the opposite task - changing an Excel date to text - a few choices are available to you again.

Traditionally, we'll begin with a formula solution and then explore a couple of non-formula ways.

Using TEXT function in Excel to convert date to text

The Excel TEXT function is specially designed to convert a numeric value to a text string and display it in the format you specify.

The syntax of the Excel TEXT function is as follows:

TEXT(value, format_text)

Where:

  • value is a numeric value you want to convert to text. This can be a number, a formula that returns a numeric value, or a reference to a cell containing a number.
  • format_text this is how you want to format the resulting text value, provided as a text string enclosed in quotation marks.

For example, you can use the following formula to convert a date in cell A1 to a text string in the traditional US date format (month/day/year):

=TEXT(A1,"mm/dd/yyyy")
Using Excel TEXT function to convert a date to a text string

As you see in the screenshot above, the value returned by the TEXT formula is aligned to the left, which is the first sign that points to a date formatted as text. Apart from alignment in a cell, there are a few more indicators that can help you distinguish between dates and text strings in Excel.

Example 1. How to convert date to text strings in different formats

Since Excel dates are serial numbers in their nature, the Excel TEXT function has no problem with converting them to text values. The most challenging part is probably specifying the proper display formatting for the text dates.

Microsoft Excel understands the following date codes.

Months:

  • m - month number without a leading zero
  • mm - month number with a leading zero
  • mmm - short form of the month name, for example Mar
  • mmmm - full form of the month name, for example March
  • mmmmm - month as the first letter, for example M (stands for March and May)

Days:

  • d - days number without a leading zero
  • dd - day number with a leading zero
  • ddd - abbreviated day of the week, for example Sun
  • dddd - full name of the day of the week, for example Sunday

Years:

  • yy - two-digit year
  • yyyy - four-digit year

To display the converted text date exactly the way you want, you can separate the date codes with various delimiters such as dash (-), slash (/), comma (,) colon (:), etc. Here are a few examples:

  • "mm/dd/yyyy" - the date format used in the USA, displays as 03/08/2015
  • "dd/mm/yyyy" - the date format used by the rest of the world, displays as 08/03/2015
  • "dd-mmm-yy" - displays as 08-Mar-15 to avoid any confusion : )
  • "dddd, mmmm d, yyyy" - full date, including the day of the week, displays as Sunday, March 08, 2015

For example, if you have a column of US dates in Excel and you need to export them to a .csv file for your UK based partner, you can convert the dates to the UK format, as a courtesy:

=TEXT(A1,"mm/dd/yyyy")

Some more formula examples and their results are shown below:
Converting dates to text format in Excel using the TEXT function

Example 2. How to convert time to text strings

If your date entries display both dates and times and you want to change them to text strings exactly as they are, you included the following time codes in the format_text argument of the Excel TEXT function.

Hours:

  • h - hours without a leading zero, as 0-23.
  • hh - hours with a leading zero, as 00-23.

Minutes:

  • m - minutes without a leading zero, as 0-59
  • mm - minutes with a leading zero, as 00-59

Seconds:

  • s - seconds without a leading zero
  • ss - seconds with a leading zero

Periods of the day:

  • AM/PM - displays as AM or PM
  • If not specified, 24-hour time format is used

As you probably noticed, the m codes are used for months as well as minutes, and you might be curious how Microsoft Excel distinguishes between them. If you put "m" immediately after h codes (hours) or immediately before s codes (seconds), Excel understands you want to display minutes rather than a month. Yep, it's that simple : )

The TEXT function in Excel allows including both date and time codes in the format_text argument, for example:

=TEXT(A2,"dd/mm/yyyy hh:mm")

If you want to convert the time portion only, then put only the time codes, like this:

=TEXT(A2,"h:mm AM/PM")

The results of your TEXT formulas may look similar to this:
Text formulas to convert date and time to text strings

Example 3. How to convert the current date to text in Excel

In case you want to convert the current date to the text format, you can use the Excel TEXT function in combination with the TODAY function that returns the current date, for example:

=TEXT(TODAY(), "dd-mmm-yyyy")

The result of this formula would show up as 08-Mar-2015. If you prefer to display the resulting text string in some other format, please see the date codes discussed in Example 1.

Example 4. Excel TEXT formula to convert text to date

Though the main destination of the TEXT function in Excel is converting numbers to text, it can also perform a reverse conversion, i.e. change text to date. For this, you simply add the double negation (--) to your TEXT formula.

For example, to convert a text string in cell A1 to date, you use the below formula, and then format the cell as a date.

=--TEXT(A1,"mm/dd/yy")
A TEXT formula to convert text to date

Note. In the above examples, we used the date and time codes for the English locale of Excel. If you have a different locale, the codes may be different for your language.

Converting date to text with Excel's Text to Columns wizard

As you've just seen, Excel's TEXT function makes a good job of converting dates to text. But if you are not a big fan of Excel formulas, you might like this solution better.

If you had a chance to read the previous part of our Excel dates tutorial, you already know how to use Text to Columns to change text to date. To convert dates to text strings, you proceed in the same way with the only difference that you choose Text instead of Date on the final step of the wizard.

Note. The Text to Column wizard always converts dates in the default short date format regardless of how the original dates are displayed in your worksheet. You can find more about default date and time formats in the following article: Default date format in Excel.

If the default date format is not what you are looking for, you can jump right to the next solution that lets you convert dates to text strings in any format of your choosing.

If you don't mind the default format, then perform the following steps:

  1. In your Excel spreadsheet, select all of the dates you want to change to text.
  2. On the Data tab, find the Data Tools group, and click Text to Columns.
    Switch to the Data tab and click Text to Columns.
  3. On step 1 of the wizard, select the Delimited file type and click Next.
    On step 1 of the wizard, select Delimited and click Next.
  4. On step 2 of the wizard, make sure none of the delimiter boxes is checked and click Next.
    On step 2 of the wizard, uncheck all delimiter boxes and click Next.
  5. On step 3 of the wizard, which is the final step, select Text under Column data format and click Finish.

Tip. If you don't want the resulting text strings to overwrite the original dates, specify the Destination for the top cell of the new column.
Converting dates to text format using the Convert Text to Columns Wizard

That was really easy, right? The screenshot below demonstrates the result - dates converted to text strings in the default short date format set in your Windows Regional settings, which is "mm/dd/yyyy" in my case:
Dates converted to text strings in the default short date format

Convert Excel date to text via Notepad

Another quick no-formula way to turn Excel dates into text strings is using Notepad or any other text editor. Unlike the Text to Columns wizard, it allows you to convert Excel date to text in any format of your choosing.

  1. In your Excel worksheet, format the dates exactly as you want the text strings to look like.
  2. Select all of the dates you want to convert and press Ctrl+C to copy them.
    Copy the dates you want to convert to text.
  3. Open Notepad or any other text editor, and paste the copied dates there.
  4. Notepad automatically converts the dates to the text format. Press Ctrl+A to select all text strings, and then Ctrl+C to copy them.
  5. Switch back to Microsoft Excel, select the column where you want to insert the text strings and apply the Text format to it. To do this, press Ctrl+1 to open the Format Cells dialog and select Text on the Number tab.
    Select the column where you want to insert the text strings and apply the Text format to it.
  6. Finally, select the first cell where you want to insert the text strings and press Ctrl+V to paste them.

The following screenshot shows the result, with the original Excel dates in column B and text entries in column D. Please notice that the converted text strings reflect the original date format with absolute accuracy, except they are left-alighted, as all text values are supposed to be in Excel.
The converted text strings look identical to the original dates.

This is how you convert date to text in Excel. Next week we will explorer a few Excel functions to work with weekdays and days of the year. And in the meantime, you may want to check out the previous parts of our comprehensive tutorial to working with dates and times in Excel.

Excel Dates Tutorials:

212 comments

  1. Hi,
    Anybody help me to change this time format to words ?

    (55:56:14 , it shows 7 hours, 56 minutes and 14 Seconds)
    it should be 55 hours.... ...

    INT(D179)&" Days," & HOUR(N179)&" hours, " &MINUTE(N179)&" minutes and "&SECOND(N179)& " Seconds"

  2. Hello! I require conversion of date of birth (25/09/1998) to date of birth in words as "Twenty fifth September Nineteen Ninety Eight" in Excel. Please help me.

  3. I am trying to make the formula that in cell A1 has a date and other cell B1 specific date or text i.e "Not Selected" and result in other cell C1 should be the month and days while cell B1 can be counted the today date. I could not make that formula. Please help me. Thank you in advance.

  4. Hi Svetlana,

    I am trying to convert several weeks of date formatted eg;Wednesday, 1 March 2017 to straight text 'WED" for use in pivot table /graphs.

    Custom formatting using "ddd" still retains the "number" value, and using a notepad to convert will not work as I am using Macros.

    Thank you in advance.

  5. Dear Svetlana,

    When I write 2013 on my excel sheet I have the problem that excel sees it as 1905, I have tried to use =Year(2013), change format, use text to columns but doesn't seem to found a way to correct this, could you help me?
    Best regards

  6. How do you convert 2015-JAN-10 to read 01-10-15 in excel?

  7. Is there a way to have a cell pull date data from one cell (ex. May 15, 2017) to say 'Mid May' instead?

  8. How to convert 'January 18th 2017, 12:04 am' to '18/01/2017 12:04 AM' in Excel?

  9. Hi,

    Can you please help me to convert the date format 24/01/2017 in "Twenty-Forth January Two Thousand Seventeen"..??

    Please let me know.. its very urgent

  10. hi.
    how to change date of birth figure in to words in ms excel 2010. for Example 4/3/2002.4th May Two Thousand Two

  11. Hi Svetlana,

    I am trying to copy a either an entire worksheet or a range of data from one workbook to another. I can do this successfully manually, by selecting all the cells with data in them and pasting into a newly created worksheet (Date format is maintained). However when I try to do this via VBA any date with a day greater than 12 gets converted to text [US (m/dd/yyyy)/Australian (dd/mm/yyyy) format change]. I've tried formating the cells first to US format dates but this doesn't help. Any sugestions?

  12. Hi Svetlana.

    This blog is awesome. Thanks

    I have a column D in an Excel sheet that shows date exported from a system in the format;
    day/ month / yyyy as shown in examples below
    29/07/2010
    24/04/2010
    9/7/2010
    20/07/2010
    15/08/2010
    etc

    I need to convert these dobs in to a 4 digit PIN code DDMM
    so results from above will be:
    2907
    2404
    0907
    2007
    1508

    I've tried =TEXT(D2,"mmdd") but it keeps the slashes / and always retains the yyyy at the end
    I've tried =TEXT(D2,"dd")&TEXT(D2,"mm") but same issues

    A maths friend gave me this and it seemed to work for a while:
    =IF(LEN(TEXT(100*DAY(D2)+MONTH(D2),0))=3,CONCATENATE("0",TEXT(100*DAY(D2)+MONTH(D2),0)),TEXT(100*DAY(D2)+MONTH(D2),0))

    I'm using Excel 2010. Help please.

    Thank you in anticipation

    • Hi Mark,

      This simple formula works just fine for me:
      =TEXT(D2, "ddmm")

      You can check it in a new empty sheet by typing a few dates manually in your default date format, not copy/paste from the existing sheet. If it works with the regular dates typed manually, then most likely the problem is with the exported dates, e.g. they may be text strings that look like dates. To check this, select any cell with a date, and look at the Number Format box on the Home tab > Number group. If it shows Text or General, you are dealing with text strings, not dates. In this case, you can simply extract the 1st, 2nd, 4th, and 5th character using this formula:
      =LEFT(D2,2)&MID(D2,4,2)

      Please note, the above formula will work only if all the dates are in the same format, i.e. dd/mm/yyyy.

      If there are dates formatted as d/m/yyyy (without leading zeros), you will need to convert text strings to dates first, and then apply =TEXT(D2, "ddmm") to the converted dates.

      • OK - thanks for confirmation & the extra info

  13. that was very simple way of doing.
    Is there no other option, using Text and columns??

    • Sure, you can use the Text to Columns feature too as demonstrated in this example:
      Covert text to date with Text to Columns. I prefer 'Replace All' because it's faster, but it's up to you.

      Another way to convert a date in mm.dd.yyyy (or dd.mm.yyyy) format to mm-dd-yyyy (or dd-mm-yyyy) is using the Substitute function:
      =VALUE(SUBSTITUTE(A1, ".", "-"))

  14. Hi,
    I would like to learn, how to convert 01.01.2016 to 01-01-2016 format.

  15. Hi all,
    I would like to convert date, i.e. 31-12-2015 into text format... like Thirty one - December - Two thousand fifteen.

  16. I would like to enter a ratio like "1:1" or "7:5" in a cell that has been previously formatted as Text. Excel 2013 constantly changes my entries to date/time formats. How hard is it for the geniuses in Redmond to understand that when I format a cell as Text I want whatever I enter in it to be displayed EXACTLY AS I HAVE ENTERED IT and NOT AS ANYTHING ELSE???????

  17. How to use d(), m() and y() functions in excel

  18. I have cells formated as text.now i wantto genrate todaydate but in text formate these cells does not read today date.plz help

  19. i want to know how to convert date into words(english) in excel 2003 or 2007
    for eg. 22.04.2010 - convert it into Twenty Two April 2010 or Twenty Two April Two Thousand Ten.

  20. is it possible to covert a numeric date into complete Text format? e.g 13/02/2015 in thirteenth February Two thousand and fifteen.

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)