I have searched the forums but am not able to make this work. I need to only show upcoming dates and right now, it shows all dates regardless. In the below example, i am simply showing the next date.
When I echo $today, it displays correctly as Y, d, m.
I did something very similar and I had the same problem…it was showing all the dates and not making the comparison. The problem turned out to be the way the date is formatted. Make sure the value in your meta-key, ‘event’ is in the same format as $today. This is where your problem is in this example. You need to use “Y-m-d”. Also it is recommended to use new WP_Query instead of query_posts.