I've found several similar question but none of them explains why the below is giving me nothing with ASC order. It works with DESC.
Basically it's a query that should list posts where the custom field values are equal or greater to the current date, then arrange it in reversed order, so the first post should be a post that's custom field are the closest the the current date.
<?php query_posts($query_string . '&showposts=4&order=ASC&post_type=custompost&meta_key=mydate&orderby=meta_value'); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php $todays_date = date("Y/m/j"); ?>
<?php $today = strtotime($todays_date); ?>
<?php $exp_date = get_post_meta('mydate'); ?>
<?php $expiration_date = strtotime($exp_date); ?>
<?php if ($expiration_date >= $today) { ?>
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
<?php } else { ?>
<?php };?>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
Also, I've tried many different queries but none of them worked, the above script is the latest I have.