Days in month

How to Get Days in a Month in Excel

Are you having a problem getting the actual days in a month? Well, you to try out some excel formula. If you have a date and you want to get days in that month, use a formula that has EOMONTH and DAY as the main functions.

Generic Formula:

=DAY(EOMONTH(date,0))

…where “date” is the

Example:

If you have some dates and you want to get a quick answer to the number of days in a month, this is how you get it:

Figure 1. Example 1 of DAY/EOMONTH Function

From this example, the formula in C4 is:

=DAY(EOMONTH(B4,0))

….where B4 is the date.

How does the DAY/EOMONTH Work?

Starting from the insides, the EOMONTH is evaluated first and it returns the date corresponding to the month’s last day for a given date. Next DAY function works on the returns of the EOMONTH, to return the date value for that date. It’s also important to note that the value return by DAY function is the number of total days in a given month. That’s simply how this formula (DAY and EOMONTH) is used to get days in a month.

 

Our customers love us!
“The expert was absolutely amazing and stuck with me the whole way through. They were polite, patient, seemed to want to genuinely help me and provided a solution that I would never have managed otherwise. I could not be more thankful for their support and solution. Thank you!” - - Chris T, in California

Leave a Comment

avatar