Jump to content

Archived

This topic is now archived and is closed to further replies.

ego0

Select after date

Recommended Posts

Is there a way of selecting all rows in a table after a certain date.

The date format is 2006-07-22 11:41:17 and I want to select all rows since that date.

So all rows since 2006-07-21 11:41:17

Thanks

Share this post


Link to post
Share on other sites
if your data type is DATETIME (which it appears to be), you can simply use the greater than operator:
[code]
SELECT * FROM table WHERE dateCol > '2006-07-22 11:41:17';
[/code]

Share this post


Link to post
Share on other sites
I think MySQL is rather lenient, and will "choose" the correct type, even if it was DATE column.

Share this post


Link to post
Share on other sites
Thanks so much :), You wouldn't beleive how helpful this is!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.