You've not posted a lot of information about how you store the date, what you really mean by 'encode' it etc.
If you posted more information you'd probably have been answered by now.
But basically I store my dates in typical YYYY-MM-DD HH:MM:SS format, so if I wanted someone to not be able to log in until, say 1 week from being banned, the query would be like:
SELECT ip,date, FROM table WHERE unix_timestamp(date)+604800 >= unix_timestamp(NOW())
604800 = 7 24 60 * 60 (= 1 week)
This is making some assumptions about your table etc, but is a simple way of checking a time has passed.