blurredvision Posted May 29, 2009 Share Posted May 29, 2009 I have a MySQL table that has a column for dates, and they are in this format: YYYY-MM-DD The column has the DATE data type. The database will always have dates older than today, but will only have at most 14 dates into the future for certain events. What I'm wanting to do is populate a drop down box in one of my forms that will only show today's date along with any dates forthcoming. Dates older than today I do not want. So, for example, today is 2009-05-29. I have a column with the following dates: 2009-05-21 2009-05-23 2009-05-28 2009-05-31 2009-06-02 2009-06-04 2009-06-07 From my explanation, I only want to bring back events that may happen today, as well as any future event dates. What is the best way to go about this? Let's just say that having the event dates in this format is the ONLY way that they can be entered into the database, so anything I do will have to use the above example format. I appreciate any suggestions. Quote Link to comment Share on other sites More sharing options...
waynew Posted May 29, 2009 Share Posted May 29, 2009 WHERE my_date_column >= CURDATE() 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.