SELECT NOW() - 2 days
Posted: Mon Aug 27, 2007 7:29 am
I am looking for a way to take the NOW() function and subtract 2 days from it but still keep the timestamp in the same format. Basically I have this query:
but I want to get WHERE bo.expiration_date < NOW() - 2 days so I can have the data on bonus offers that will expire within 2 days. How do I go about that?
Code: Select all
SELECT
bo.id, bo.bonus_code, rm.title
FROM
rb_bonus_offers AS bo
LEFT JOIN
rb_rooms AS rm
ON
bo.fk_room_id = rm.id
WHERE
bo.active = "1"
AND
bo.never_expires = "0"
AND
bo.expiration_date < NOW()