1current month
2 //half name in words
3 date('M');
4//full name in words
5date('F');
6//number
7date('m');
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."'");
1echo 'Day' . date('d', strtotime($row['Date']));
2echo 'Month' . date('m', strtotime($row['Date']));
3echo 'Year' . date('Y', strtotime($row['Date']));