Hai folks,

i am struggling to use the LEFT function in the below scenario :

sms_logs table :

date
+---------+
2012/08/11 11:03:27 AM
2012/08/13 11:03:27 AM
2012/08/13 11:03:27 AM
2012/08/14 11:03:27 AM
2012/08/15 11:03:27 AM

i want to retrieve all the rows recorded on 2012/08/13

so i am using the below code

Code:
$dt='2012/08/13';
$query = "SELECT * from sms_logs WHERE LEFT(date,10)='$dt'";
The above query returns 0. whats wrong?


edited :

also tried below and failed.

Code:
$query = "SELECT LEFT(date,10) from sms_logs WHERE date='$dt'";