Number of days in a particular month

You must also provide the year
There are four months that always contain 30 days and they are: April, June, September and November.
There is one month that always contains 28 days (except on a leap year) and that is February.
There is one month that always contains 29 days (only on a leap year) and that is February.


Example

 A
1=TODAY() = Tuesday 01 October 2024
2=NOW() = Tuesday 01 October 2024 06:08:01
3=DATE(YEAR(A1), 2, 1) = 01/02/2024
4=DATE(YEAR(A1), 4, 1) = 01/04/2024
5=DAY(EOMONTH(A1, 0)) = 31
6=DAY(DATE(YEAR(A1), MONTH(A1)+1, 1)-1) = 31
7=DAY(EOMONTH(DATE(YEAR(A3), 4, 1), 0)) = 30
8=DAY(DATE(YEAR(A3), 4+1, 1)-1) = 30
9=DAY(EOMONTH(A3, 0)) = 29
10=DAY(DATE(2024, 3, 1)-1) = 29

1 - Displays the current date. Custom format "dddd dd mmmm yyyy".
2 - Displays the current date and time. Custom format "dddd dd mmmm yyyy hh:mm:ss".
3 - Displays the first day of February in the current year.
4 - Displays the first day of April in the current year.
5 - Displays the number of days in the current month of the current year using EOMONTH.
6 - Displays the number of days in the current month of the current year using DATE, YEAR and MONTH.
7 - Displays the number of days in the month of April of the current year using EOMONTH.
8 - Displays the number of days in the month of April of the current year using DATE, YEAR and MONTH.
9 - Displays the number of days in the month of February of the current year using EOMONTH.
10 - Displays the number of days in the month of February in the leap year 2024.


Built-in Functions

DATE - The date as a date serial number given a year, month, day.
DAY - The day as an integer given a date serial number.
EOMONTH - The date serial number of the last day of a month before or after a date.
MONTH - The month as an integer given a date serial number.
NOW - The date serial number of the current system date and time.
TODAY - The date serial number representing today's date.
YEAR - The year as an integer given a date serial number.


User Defined Function

DAYSINAMONTH - Returns the number of days in a particular month and year.


Related Formulas

Number of months between 2 dates
Number of days between 2 dates
Number of days in a particular year
Number of days left in the current month
Number of days left in the current year


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top