Hi, Ive got data in a field and its in the format of :
05/01/2004 - 06:03
My question is, how easy is it to write a query to get for example decembers results?
$strtDate = $yourYear."-".$yourMonth."-1"; $endDay = $yourYear."-".$yourMonth."-31";
// or startyear = 1970 // endyear = date("Y"); // current month = date("m");
$q = "SELECT id FROM table WHERE dateAdded BETWEEN '$strtDate' AND '$endDay'";
my sql part is
$sql = "SELECT field1,datestamp, count(*) AS cnt FROM phplog WHERE phplog.datestamp='xxxxxxxx' GROUP BY field1";