i have a table where i keep track of Posts replies,
USERID POSTEDTDATE REPLYDDATE
------ ----------------------- -----------------------
26167 2012-03-12 00:00:00.000 2012-03-19 00:00:00.000
26362 2012-03-17 00:00:00.000 2012-04-02 00:00:00.000
26411 2012-04-10 00:00:00.000 2012-05-01 00:00:00.000
26491 2012-04-09 00:00:00.000 2012-04-12 00:00:00.000
i want to get the count result for the replies for less than 15 day!?
SELECT COUNT(sms_Mailing.nameSurname)
FROM sms_Mailing
WHERE sms_Mailing.replyDate <= '".date('Y-m-j' ,strtotime('+2 weeks' , strtotime (sms_Mailing.replyDate)))."'
tried something like this but seems to be not a good soultion
can someone help please
You can get the date like that:
or
And then the query could be:
Here you can see other
INTERVALoptions.