1current month
2 //half name in words
3 date('M');
4//full name in words
5date('F');
6//number
7date('m');
1<?php
2 // First day of this month
3 $d = new DateTime('first day of this month');
4 echo $d->format('jS, F Y');
5?>
1//get first day of the current month
2$start = date("Y-m-1 00:00:00");
3//get current date of the month
4$end = date("Y-m-d H:i:s");
5
6//query data for the current month so far
7$query = $this->db_model->run_query("select column_1, column_2 from table where date_column BETWEEN '".$start."' AND '".$end."'");