Answers for "php first day 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 start and end date of month and year

<?php

$query_date = '2010-02-04';

// First day of the month.
echo date('Y-m-01', strtotime($query_date));

// Last day of the month.
echo date('Y-m-t', strtotime($query_date));
Posted by: Guest on July-01-2020
0

get first day of current month php

<?php
    // First day of this month
    $d = new DateTime('first day of this month');
    echo $d->format('jS, F Y');
?>
Posted by: Guest on July-30-2020
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
1

php last day of month

$a_date = "2009-11-23";
echo date("Y-m-t", strtotime($a_date));
Posted by: Guest on July-28-2020
1

get next month first day php

$config_month  = 1;
$config_day = 1;

$new_expiry_date = date('Y-m-d', mktime(0, 0, 0, date('m') + $config_month, 1 + $config_day, date('Y')));
Posted by: Guest on January-08-2021

Browse Popular Code Answers by Language