Seems like a pretty simple expression.
joindate < DATE(NOW()) + INTERVAL -6 MONTH
take current date, subtract 6 months from it, and then compare to the joindate column, to find out if joindate is earlier.
We can test that in a query:
SELECT t.joindate < DATE(NOW()) + INTERVAL -6 MONTH `older_than_six_months`
, t.joindate
, t.id
, ...
FROM mytable t
ORDER BY t.joindate ASC
The expression will return 1 (true) if joindate is earlier than six months, or return 0 (false) or NULL.
We can specify a specific date value in place of DATE(NOW())
for testing
SELECT t.joindate < DATE(NOW()) + INTERVAL -6 MONTH `older_than_six_months`
, t.joindate < '2018-07-01' + INTERVAL -6 MONTH `six_months_20180701`
, t.joindate
, t.id
, ...
FROM mytable t
ORDER BY t.joindate ASC
Once we have an expression that is tested, we can use it in a DELETE statement
DELETE t.*
FROM mytable t
WHERE t.joindate < DATE(NOW()) + INTERVAL -6 MONTH
(Personally, I would do the less than or less than or equal comparison test <
or <=
rather than an equals test.)