December 3, 2020

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 Excel worksheet or when a calculation is dependent on the current date.

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).

=TODAY()

In the below example we have added the number of days mentioned in cell A2 with today’s date(4-Mar-2020) 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 both Excel & 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 ‘mm/dd/yyyy’ format.

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.

Here TODAY function returns 4-Mar-2020 (which is the current date while framing this example). DAY function returns the DAY value as 4.

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 both Excel & 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 ‘mm/dd/yyyy’ format.

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.

Here, TODAY function returns 5-Mar-2020, which is the current date while framing this example. MONTH function returns the month value as 3.

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 in both Excel & 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.

The YEAR function works similarly if you enter the date in ‘dd-mmm-yy’ 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.

Here the TODAY function returns 5-Mar-2020, which is the current date while framing this example. The YEAR function returns the year value as 2020 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 Excel.

Leave a Reply

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