Alex Rivera | Logout

how to find out number of days in month in mysql

Asked 2012-05-24T11:53:53.290
39

I have several dates in mysql tables, using those dates I need to find out the number of days in the month. Suppose i have 2003-02-05 it should return 28. for example

date                days_in_month
2003-2-3            28
Edit
Report

1 Answer

97
SELECT DAY(LAST_DAY(yourdate))
answered 2012-05-24T11:56:46.427

Your Answer