Hi Guys,
How do I select just the first part of the date field:
My date is stored like so 1/9/2008 & 27/4/08
So the code below only picks up the first number, but if I get it to pick up two numbers and the date is like the first so 1/9/2008 it picks up "1/" which wouldn't work.
$stats = "SELECT * FROM contactus WHERE month LIKE $month AND substring(date,1,1) BETWEEN '$from' AND '$to'";
It thinks that a date like 10/9/2008 is a 1 not a 10
So I want everything left of the first "/"
Hope this makes sense and someone can help me here,
Thanks!