I have a mysql field emp_join_date of type timestamp and its in the format yyyy-mm-dd hh:mm:ss . Now I need to retrieve the month and date only from that field and in the query itself . How can I able to do this ?
$sql = "
SELECT
emp_id,emp_status,emp_type,emp_join_date
FROM
tbl_events
WHERE
event_show = 'all'
AND
event_status != 'disabled'
ORDER BY
RAND()
LIMIT 0,4
";
DATE(emp_join_date) for date and MONTH(emp_join_date) for month