Hello All,
I have a log table, where I am storing the employee details whoever log in or log out,
I am copying my query below,
(btw the query is in MYsql)
SELECT * FROM logdetails WHERE DATE_FORMAT(logdetails.CreatedLogDate,'%m/%d/%Y') >= '01/01/2013' AND DATE_FORMAT(logdetails.CreatedLogDate,'%m/%d/%Y') <= 01/03/2013
the above query is working fine if I am searching records which are between 1st January of 2013 to 3rd January of 2013.
But my real problem is if I am using the same query to search records between 1st Dec of 2012 to 3rd January of 2013, this query is failing to get records,
SELECT * FROM logdetails WHERE DATE_FORMAT(logdetails.CreatedLogDate,'%m/%d/%Y') >= '12/01/2012' AND DATE_FORMAT(logdetails.CreatedLogDate,'%m/%d/%Y') <= 01/03/2013
can anyone tell me reason why this is happening.