DATE function.Get date (serial value) by specifying year, month, and day.(Microsoft Excel)
Get date (serial value) by specifying year, month, and day.
If you simply want to enter a date, it is easier to do cell entry in date format.
This DATE function is used to generate dates (serial values) in formulas and to perform calculations for year and month days.
How it works
=DATE(Year,Month,Day)
Argument | Omission | Specify |
---|---|---|
Year | Required argument. | Numbers from 1900 to 9999. |
Month | Required argument. | Numbers from 1 to 12. |
Day | Required argument. | Numbers from 1 to 31. |
Example Results
Arguments and execution results.
Due to the convenience of the function's internal calculations, impossible numbers such as less than 0 or greater than 32 will be calculated even if they are entered.
If the year 1899 is entered, the result will be 3799 years.
If the year exceeds 10,000 years, a #NUM! error is generated, and if non-numeric values such as letters of the alphabet are mixed in, a #VALUE!.
Leap day
If you take 2/29/2019 as an argument, the result will be 3/1/2019.
If you want to treat such a case as 2/28, the formula should look like this
=IF(AND(MONTH(DATE(Year,Month,Day))=3,月=2,年=29),DATE(Year,Month,Day)-DAY(DATE(Year,Month,Day)),DATE(Year,Month,Day))
Column G column H is the result of the execution.
Spill
If you specify the argument "Year" or "Month" or "Day" the cell range, it will be Spil.
---
Discussion
New Comments
No comments yet. Be the first one!