Answers for "php date string to first of month"

PHP
1

first day of month php

$first_day = date('Y-m-01');   $last_day = date('Y-m-t');
Posted by: Guest on August-29-2021
0

php get current month first date

//get first day of the current month 
$start = date("Y-m-1 00:00:00");
//get current date of the month
$end = date("Y-m-d H:i:s");

//query data for the current month so far
$query = $this->db_model->run_query("select column_1, column_2 from table where date_column BETWEEN '".$start."' AND '".$end."'");
Posted by: Guest on May-12-2021

Code answers related to "php date string to first of month"

Browse Popular Code Answers by Language