The table has dates ranging from the past to the future.How would I figure out the distance from the current date so that the result from 3 days in the future and 3 days in the past were the same?
Thank you E
I figured it out:
SELECT member_id, end_date,
IF((end_date-now())<0, (end_date-now())*-1, end_date-now()) AS 'deviation'
WHERE `status` ='yes' and end_date >'0'
GROUP BY `member_id`
SELECT member_id, end_date,GREATEST(end_date,NOW()) - LEAST(end_date,NOW()) AS 'deviation'FROM ...