Convert date to month and year

There are several ways to convert a date to month and year. In this article we, will learn about two formula. The first approach will be using TEXT() function. The second approach will use YEAR() and MONTH() functions.

What is TEXT()?

The TEXT() function in excel, applies a number format that a user specifies to a numeric value and converts it into text.

Formula

=TEXT(date, “yyyymm”)

This formula will convert the date into the given format. “yyyymm” format will join 4 digit year to 2 digit month value.

Let us go through an example

How to convert a date to month and year?

Figure 1. Example 1 of TEXT() to Convert date to month and year

In this example you have a small date table To apply TEXT() on this table:

  1. Select any column, where you want to display the result. In this case, it is H5..
  2. In the function box, type TEXT() FUNCTION.
  3. Give the arguments i.e. the date and format. For H5, assign the G5 and yyyymm. The count came out to be 201701; 2017 being the year attached with 01 the month.
  4. You can observe the same for the rest of the table as well.

Alternative Way to Convert Date to Month and Year using YEAR and MONTH()

Figure 2. Example 1 of YEAR() and MONTH() to Convert date to month and year

You can also convert a date to month and year using YEAR() and MONTH() functions. Let’s see how to achieve the same result using these functions.

  1. Select any column, where you want to display the year for a particular date. In this case select H20.
  2. Go to the function box and type YEAR().
  3. Provide the arguments i.e. the date. For H20, assign the date, G20. The year came out to be 2017.
  4. Similarly, select any column, where you want to display the month for a particular date. In this case select I20.
  5. Go to the function box and type MONTH().
  6. Provide the arguments i.e. the date. For I20, assign the date, G20. The month came out to be 1.
Our customers love us!
“The expert was absolutely amazing and stuck with me the whole way through. They were polite, patient, seemed to want to genuinely help me and provided a solution that I would never have managed otherwise. I could not be more thankful for their support and solution. Thank you!” - - Chris T, in California

Leave a Comment

avatar