The DATE function is the best way to create a valid date in Excel.
It can create a valid date as per Excel's date system by providing the year, month and day as a number.
In simple words, it returns a date on the basis of a year, month and day you provide.
- year A number to use as the year.
- month A number to use as the month.
- day A number to use as a day.
In the below example, we have used cell references to specify the year, month and day to create a date.
We can also insert arguments directly into the function to create a date as you can see in the below example.
And in the below example, we have used different types of arguments to see the result returned by the function.
- 1900 as the year for the date.
- If we mention -1 as a month it has gives us the date of November month of the last year. The point is, when you specify a year, month or day in negative number it will deduct that number from the starting month of the year you have mentioned.
- And, if you mention 0 as a month number it will give you the date of last month of the previous year.
- If you specify zero as a year number it will give you 1900 in the year as excel use dates from 1900 to 10000.
- When you mention zero as a day it will return last day of the previous month.
- And, if you mention the day in negative number it will deduct those days from last day of the previous month.
- You can enter year from 1900 to 10000. If you enter any year below than 1900 it will that number to 1900. For example, if you enter the year as 102 it will return the year 2002.
- It is recommended to enter a four-digit number for the year to avoid any issue.
- Year, Month and Day can be negative or positive.
- Excel store dates as serial numbers.