Answers for "php get current month and year"

PHP
31

Javascript get current year

var currentYear= new Date().getFullYear();
Posted by: Guest on July-25-2019
14

php get current year

$currentYear=date("Y");//2019
Posted by: Guest on October-30-2019
1

get current month php

current month
  //half name in words
  date('M');
//full name in words
date('F');
//number
date('m');
Posted by: Guest on July-30-2020
1

php grab month from date

$month = date("m",strtotime($mydate));
Posted by: Guest on June-11-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
2

get current month php

date('m');
Posted by: Guest on May-25-2020

Code answers related to "php get current month and year"

Browse Popular Code Answers by Language