Home › Forums › General Issues › Query Time Picker field › Reply To: Query Time Picker field
Hey Jonathan,
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' => '>=',
),
),
));
Thanks!
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.