Hi I am trying to run a MYSQL query to display all records within a 12 month period. I have to use from_unixtime function to great a date object.
select call_start_time from call_detail_records
where call_start_time IN (
select from_unixtime(call_start_time) from call_detail_records
where from_unixtime(call_start_time) < Now()
and from_unixtime(call_start_time) < DATE_ADD(Now(),INTERVAL- 12 MONTH)
);
The query is syntactically correct but mysql returns no records when there are some. Can someone help?