In Calc, how can i get the number of days in month

I would like to know if there is a formula to get the exact number of days in a month using Calc

Thanks

Update: Thanks to Pedro and erAck
im using libreoffice in french and i set up to use formula’s english name. Every formulas are in english except a few like =DAYSINMONTH() which is =JOURSDANSMOIS() in french.

Sorry and thanks a lot!

=DAYSINMONTH(date)

E.g. Calculate days for the current month =DAYSINMONTH(TODAY())

For other related functions look in the help file’s Index for “Date and Time Functions”

Thanks for the quick answers but =DAYSINMONTH and =EOMONTH are not recognized by libreoffice 4.1.5.3 :frowning:

In general the number of days between two dates can be obtained by subtracting the dates, i.e. =date2-date1 where each date can be a date cell value or a result of the DATE() function, for example the number of days in month May of the year 2014 would be =DATE(2014,6,1)-DATE(2014,5,1) => 31

Ah yes, and of course there is the DAYSINMONTH() function (forgot about that, thanks Pedro), so for an arbitrary date that would be either =DAYSINMONTH(datecellreference) or for example =DAYSINMONTH(DATE(2014,5,1))

Thanks for the quick answers but =DAYSINMONTH and =EOMONTH are not recognized by libreoffice 4.1.5.3 :frowning: