August 2, 2021

TODAY function in Google Sheet

In this lesson we will learn the usage of TODAY function in Google Sheet. TODAY function is used to get the current date. It can be used when you want to update the date whenever someone opens a Google Sheet or when a calculation is dependent on the current date.

=TODAY()

It can also be used to quickly calculate the time that had elapsed between today and any specified date. For example, if you were born on 22 November 1984, you can calculate your age using this formula =TODAY()-DATE(1984,11,22). In the below example we have used the below function in cell B2.

=TODAY()+A2

Here the number of days mentioned in cell A2 is added with today’s date(28/01/2021) returned by TODAY function and calculated the final date in cell B2.

Now we will see How to get the DAY value of a Date in Google Sheet.

You can use the DAY function when you want to get the day value (ranging between 1 to 31) from a specified date in Google Sheet. It returns a value between 0 & 31 depending on the date used as the input. For example, for the month of February, it will return a day value between 0 & 29.

=DAY(date)

Here the date can be manually entered(in double quotes) or can be the output from a function or a cell reference that contains a date value.

In below example, we have used DAY function to find out the day value for the date mentioned in cell A2 in ‘dd/mm/yyyy’ format. In cell A2 we have added the below function.

=DAY(A2)

The DAY function works similarly if you enter the date in ‘dd-mmm-yyyy’ format.

In the below example, the DAY function is used with TODAY function as an argument. TODAY function returns the current date, and the DAY function used it to return the day value of that month. In cell A2 we have added the below function.

=DAY(TODAY())

Here TODAY function returns 28/01/2021 (which is the current date while framing this example). DAY function returns the DAY value as 28.

Now we will see How to get the MONTH value of a Date in Google Sheet.

You can use the MONTH function when you want to get the month value (ranging between 1 to 12) from a specified date in Google Sheet.

=MONTH(date)
  • Here the date can be manually entered(in double quotes) or can be the output from a function or a cell reference that contains a date value.

In below example we have used MONTH function to find out the month value for the date mentioned in cell A2 in ‘dd/mm/yyyy’ format. In cell A2 we have added the below function.

=MONTH(A2)

The MONTH function works similarly if you enter the date in ‘dd-mmm-yyyy’ format.

In the below example the MONTH function is used with TODAY function as an argument. TODAY function returns the current date, and the MONTH function used it to return the month value of that month. In cell A2 we have added the below function.

=MONTH(TODAY())

Here, TODAY function returns 28/01/2021, which is the current date while framing this example. MONTH function returns the month value as 1.

Now we will see How to get the YEAR value of a Date in Google Sheet.

You can use the YEAR function when you want to get the 4 digit year value (starts from the year 1900) from a specified date Google Sheet.

=YEAR(date)
  • Here the date can be manually entered(in double quotes) or can be the output from a function or a cell reference that contains a date value.

In below example we have used YEAR function to find out the year value for the date mentioned in cell A2 in ‘mm/dd/yyyy’ format. In cell A2 we have added the below function.

=YEAR(A2)

The YEAR function works similarly if you enter the date in ‘dd-mmm-yyyy’ format.

In the below example the YEAR function is used with TODAY function as an argument. TODAY function returns the current date, and the YEAR function used it to return the year value of that date. In cell A2 we have added the below function.

=YEAR(TODAY())

Here the TODAY function returns 28/01/2021, which is the current date while framing this example. The YEAR function returns the year value as 2021 from today’s date.

Notes :

  • TODAY is a volatile function. This means that the value of TODAY function keeps on changing based on the current date which may add longer processing time due to re-calculation.
  • Dates starting from January 1, 1900 (for windows) and 1904 (for Mac) can only be handled in Google Sheet.

You can check here how the TODAY function works in Excel.

You can check here how the DAY function works in Excel.

You can check here how the MONTH function works in Excel.

You can check here how the YEAR function works in Excel.

Leave a Reply

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