6 Easy Tricks to Convert Date to Text (YYYYMMDD) in Excel

In this article, I’ll show you three excellent methods on how to excel convert date to text (yyyymmdd). Furthermore, these strategies will allow you to solve the problem that brought you here. However, you will learn some important Excel features and functions in this post that will come in handy for any Excel task.


📁 Download Excel File

The sample worksheet that was used during the discussion is available to download for free right here.


Learn to Convert Date to Text (YYYYMMDD) in Excel with These 6 Useful Techniques

Here in this article, we will learn how to compare addresses in Excel using different approaches. To accomplish that we will consider a dataset containing a list of government holiday dates.

Sample date of Dates

To be exact, I’ve provided a total of 6 methods down below.

Method

1. Using TEXT Function

In this approach, we will use the TEXT function to convert a Date format to text string of (yyyymmdd) format. The steps are given below:

⬇️⬇️ STEPS ⬇️⬇️

  • Select cell C6.
  • Write down the following formula:

=TEXT(B6, “yyyy-mm-dd”)

Using TEXT function to excel convert date to text yyyymmdd

  • Press Enter key and drag the fill handle to see the results.

Using excel convert date to text yyyymmdd

Thus you can convert the date to a text string in (yyyymmdd) format.

📕 Read More: How to Convert Number to Text with 2 Decimal Places in Excel

Method

2. Apply Custom Formatting

Now, we will try a different approach. We will not adopt any formula rather we will try the Format Cells option. The procedures are described step by step.

⬇️⬇️ STEPS ⬇️⬇️

Using format cells to excel convert date to text yyyymmdd

  • Secondly, go to Format Cells by clicking right on the mouse.

Selecting format cells option

  • And select the Custom option.
  • Subsequently, insert yyyy-mm-dd in the typed dialogue and click OK.

Applying text yyyymmdd format.

  • Finally, hit Enter key to see the results.

List in text yyyymmdd format.

In this way, you can convert the date to a text string in (yyyymmdd) format.

📕 Read More: 4 Ways to Convert Number to Text and Keep Trailing Zeros in Excel

Method

3. Utilizing TODAY and TEXT Functions Combined

Now we will use both the TEXT  and TODAY functions to convert a date format to a text string. The steps are given here:

⬇️⬇️ STEPS ⬇️⬇️

  • Pick a blank cell.
  • Insert the following formula.

=TEXT(TODAY(), “yyyy-mm-dd”)

  • Press Enter to see the results.

Using TODAY function to excel convert date to text yyyymmdd

You can convert a Date to a text string in the format (yyyymmdd) using this method.

Method

4. Implementing Copy and Paste Technique

In a nutshell, this is the quickest method for converting dates to text.

⬇️⬇️ STEPS ⬇️⬇️

  • Select and copy the cells you want to convert.

Using copy and paste to excel convert date to text yyyymmdd

  • Paste in the Notepad which automatically converts those into text format.

Pasting in notepad

  • Then select the cells where you want to paste those text format dates.
  • Then click right and set them to Text.
  • Then simply paste the data from Notepad.

Results in text yyyymmdd format.

Thus you can convert the date into a text string.

Method

5. Using Text to Column Feature

We will try to solve the task by using the Text to Column wizard. Let me explain the steps one by one.

⬇️⬇️ STEPS ⬇️⬇️

  • Firstly go to the Text to Column option from the Data
  • Check the option “Delimited” in the option and click Next.

Using column feature to excel convert date to text yyyymmdd

  • Then uncheck all the options from Delimited as I showed in the figure and click Next.

Picking options

  • Consequently check the Text option from the Column data format and preview the destination references.

Selecting Text option

  • Finally, click the Finish option.

Outputs in text yyyymmdd format.

Thus, we converted the date into text format.

Method

6. Using VBA Macro

We will use the VBA code in this method. The main idea behind this is to ease the process.

⬇️⬇️ STEPS ⬇️⬇️

  • First, select the cells.
  • Then go to view code by clicking right on the worksheet.

Using VBA macro to excel convert date to text yyyymmdd

  • Following that insert the following VBA code:
Sub Datetexts()
Dim c2 As Range
For Each c2 In Selection
c2.Value = Format(c2.Value, "dd.mm.yyyy")
Next c2
End Sub
  • And run the code.

VBA code

  • Finally, you will see the following results.

Results in text yyyymmdd format.

Using this method, you can transform a Date into a string of text in the (yyyymmdd) format.


📄 Important Notes

🖊️  Verify that you’ve employed Absolute Reference when it was required. To get an absolute cell reference, press F4.

🖊️  However, always look for ways that are easy to use in different situations.

🖊️  Every time you try to use shortcuts on the keyboard.


📝 Takeaways from This Article

📌  Use of IF and ISBLANK functions to convert a Date format to a text string of (yyyymmdd) format.

📌  Moreover, we will be able to convert a Date format to text format.

📌  In addition, we will be able to convert a Date format to text string of (yyyymmdd) format using VBA macros..


Conclusion

First and foremost, I hope you were able to apply the principles I taught in this Excel lesson on how to excel convert date to text of (yyyymmdd) format. As you can see, there are numerous ways to accomplish this. However, choose the strategy that is best suited to your situation with care. Most essential, if you become confused in any of the processes, I recommend repeating them. After reviewing the Excel file in the practice workbook that I’ve shared above, practice on your own since practice makes perfect. Above all, I sincerely hope you can put it to good use. Please share your thoughts in the comments section about how you felt throughout the article and what we should change or add to make things better for you. However, if you have any Excel-related issues, please leave them in the comments section. The Excelden team is available to answer your inquiries at any time. Finally, keep reading to educate yourself. Please visit our website ExcelDen.com for further Excel-related articles.


Related Articles

(Visited 32 times, 1 visits today)
Md Shamse Tabrej

Md Shamse Tabrej

Hi, I'm Shamse Tabrej. I'm an admirer of Excel who enjoys sharing and solving problems in Excel. I make an effort to investigate all of the choices so that I may point readers toward the most viable solutions. Both the globe and its problems are boundless. Let's assist one another in developing. Reader questions and suggestions are most welcome. 

We will be happy to hear your thoughts

Leave a reply

ExcelDen
Logo