ego0 Posted August 15, 2006 Share Posted August 15, 2006 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:17Thanks Quote Link to comment Share on other sites More sharing options...
obsidian Posted August 15, 2006 Share Posted August 15, 2006 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] Quote Link to comment Share on other sites More sharing options...
fenway Posted August 15, 2006 Share Posted August 15, 2006 I think MySQL is rather lenient, and will "choose" the correct type, even if it was DATE column. Quote Link to comment Share on other sites More sharing options...
ego0 Posted August 15, 2006 Author Share Posted August 15, 2006 Thanks so much :), You wouldn't beleive how helpful this is! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.