How to Use DATE Function in Google Sheets?

How to Use DATE Function in Google Sheets?

We can combine the dates written separately as the month, year, day in Google Spreadsheets, rotate the instant date, and find out x date is which day in the date. We will examine many more functional features like this one by one.

The date format with Google Sheets uses the date format used in America. We'll talk about the mm/dd/yyyy regional setting change in a moment. Now let's examine the syntax of the DATE function

What is the syntax for the DATE function?

The first part

In our date format, we will have a month, year, and day. We can write a date we want to these parts, as well as use their location. Let's create fields 1 and 2 with the DATE function.

  • 25/05/2022→ =DATE(A2,B2,C2) we created a date using only the positions of the cells.
  • 17/02/2022 →=DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))

Today; returns the day we are on.

=NOW() →We can return the current day's date and the current time.

  • Wednesday→=TEXT(DATE(A2,B2,C2),"dddd")

If we want to know which day the given date belongs to, we can use the DATE function by combining it with the TEXT function.

The second part

In Google Sheets, we may sometimes need to use dates as numbers. For example, in gantt chart creation, we need to convert dates to numbers. For detailed information →“How to make a gantt chart in Google Sheets?”

Google Sheets gets '0' as of date 30.12.1899. If I enter 31.12.1899 and convert it to a number, it returns '1'.

30.12.1899→0

31.12.1899→1

01.01.1900→2

How to convert the date to the number?

  1. Select the cell you want to convert to a number
  2. Menu->Format->Number

When I enter today's date in another cell "=NOW()", it returns 44,609.69. This means:

(Today) - (12/30/1899)

Since this is the starting date(12.30.1899), the days are counted from today until that date.

How to change the locale for date format?

If we do not want to use the date format in this way(mm/dd/yyyy), we can change the region we want from the regional location settings.

When you click on the Settings section, we can choose the region we want from the screen that comes up.

How to change the date format?

We may want to change the appearance of the date format we write. We can see the months as names, we may want to use another identifier instead of '/'. We can change this here:

  1. Select the cell you want to convert to a number
  2. Menu->Format->Number->Custom date and time