santa
santa

Reputation: 12512

Message for user before certain date

I need to post a message fro users that have their subscription started before, say Feb 10. I can get their subscription date from db in datatime format. How do I compare the values?

$subscr = '2011-05-23 05:17:05';
$cutoff = '2011-02-10';

Upvotes: 1

Views: 42

Answers (1)

quickshiftin
quickshiftin

Reputation: 69621

MySQL? Use the date function, something like this:

SELECT * FROM table WHERE DATE(subscr) > '2011-02-10';

Upvotes: 1

Related Questions