Google Sheets DAY, MONTH, and YEAR Functions | Get a Date Component | Google Sheets Tutorial

preview_player
Показать описание
Use the Google Sheets DAY, MONTH, or YEAR function to get the day, month, or year from a date respectively. Because the day, month, and year is obvious from the date, these three functions will have more value if they are combined with other functions. For example, the IF and DAY functions can be used together to check if a day is lesser or greater than a particular number, and then take some action based on the number.

===========================================
If you wish to know how to use DATEDIF, here is the link to the two, step-by-step video tutorials:

How to use TODAY and DATEDIF in Google Sheets?

Use DATEDIF and Calculate Age in Years, Months, and Days in Google Sheets

===========================================

Here is the format of the DAY function:

=DAY(date)

Start the formula with an equal-to symbol.

DAY is the name of the function.

date, for example, can be a function that returns a date, a reference to a cell with a date, or a hardcoded date.

Let's look at an example:

=DAY("04/28/2021")

The DAY function returns 28.

Here is the format of the MONTH function:

=MONTH(date)

Let's look at an example:

=MONTH("04/28/2021")

The MONTH function returns 4.

Here is the format of the YEAR function:

=YEAR(date)

Let's look at an example:

=YEAR("04/28/2021")

The YEAR function returns 2021.

Take a look at this video tutorial, which gives the steps to use Google Sheets DAY, MONTH, and YEAR functions with example.
Рекомендации по теме