I have a table session_dates
with some fields and a timestamp field named timestart
.
What I would like to do is select all the records from my table where the field timestart (TIMESTAMP) is equal to 21 days from now.
Like for example if today is 27 januari -> 17 februari.
I know how I can select all between two dates. My SQL Query for between 2 dates:
SELECT timestart, timefinish, sessionid
FROM sessions_dates
WHERE timestart BETWEEN UNIX_TIMESTAMP(NOW()) AND UNIX_TIMESTAMP(DATE_ADD(NOW(), INTERVAL 21 DAY))
But how to select equal to a date?
UPDATE:
I know now that I just have to use the = statement. But how can I test this? How do I know what the UNIX_TIMESTAMP(DATE_ADD(NOW(), INTERVAL 21 DAY))
returns?