One thought on “How to find the last day of the month from date?

  1. Hi Jamie

    You can use some of the build in functionality in php to easily solve this issue. In the formatting for a date field, t returns the number of days in the month of a given date. Therefore:


    $a_date = "2009-11-23";
    echo date("Y-m-t", strtotime($a_date));

    Will echo “2009-11-30”

Comments are closed.