Returns the number of days in a month.
DAYSINMONTH(date)
returns the number of days in the month in which date lies.
DAYSINMONTH("2012-02-14")
returns 29, the number of days in February 2012 (2012 is a leap year).
Imagine you have a table where you need to calculate the number of days in the month for a series of dates. This can be useful for things like:
Table:
Transaction Date | DAYSINMONTH(Transaction Date) | ||
|---|---|---|---|
A | B | ||
1 | 1/15/2024 | 31 | |
2 | 2/5/2024 | 29 | |
3 | 3/20/2024 | 31 | |
4 | 4/10/2025 | 30 |
The DAYSINMONTH function takes a date as its input. It then extracts the month and year from that date and returns the total number of days for that specific month and year. This is a very practical and useful function for a variety of purposes.
PRODUCT & FEATURES
RESOURCES
Terms | Privacy | Spam Policy
© 2026 Zapof