Home › Forums › General Issues › Query Time Picker field › Reply To: Query Time Picker field
You brought me on the right track. I’m using WP_Query now, and I tried with ‘hh-ii-ss’ format first as you suggested.
It was still not working, so I went looking in the db myself and saw it was stored as ‘hh:ii:ss’ in my case….
So this is working now:
$sluitingsdagen = new WP_Query( array( 'numberposts' => -1, 'post_type' => 'her_sluitingsdagen', 'meta_query' => array( 'relation' => 'AND', array( 'key' => 'hele_dag', 'value' => 'Nee', 'compare' => '=', ), array( 'key' => 'beginuur', 'value' => date('H:i:s',$datum),, 'compare' => '<=', ), array( 'key' => 'einduur', 'value' => date('H:i:s',$datum),, 'compare' => '>=', ), ), ));
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
❓Ever wondered when and why ACF uses JSON instead of the database? Check out our summary of the most recent session of ACF Chat Friday for the answer, and make sure to register for the next session.— Advanced Custom Fields (@wp_acf) February 23, 2023
© 2023 Advanced Custom Fields.