1 comment

  1. First, you have to store your dates in a form that sorts properly mathematically. Unix timestamps will do that. The only human-like calendar format that does it is YYYY-MM-DD. You have your dates saved backwards.
    Assuming you store as YYYY-MM-DD, then this should work:

    $args = array(
      'meta_query' => array(
         array(
            'meta_key' => 'ows_schedule_field-date', 
            'meta_value' => array($date_one,$date_two), // both dates YYYY-MM-DD
            'compare' => 'BETWEEN'
         )
       )
    )
    $posts = new WP_Query($args);
    

Comments are closed.