Home Forums General Issues Query not running as expected Reply To: Query not running as expected

  • The return value doe not matter and the “type” value of the field in the meta query cannot be “DATE”. You must query using the format the ACF stores in the DB. In ACF a date field is always stored in the format “Ymd”. Because this is not a valid DB Date format the field type must be set to “NUMERIC” or “CHAR”.

    $dateToday = date('Ymd');
            'meta_query' => array(
                'relation' => 'AND',
                    'key' => 'film_releasedate',
                    'value' => $dateToday,
                    'compare' => '>',