Do you mean $start_date_time and $end_date_time instead of 2x $start_date_time ?
If so, the first example seems to be ok.
If start_date_time = 2017-08-18 00:00:00
and $end_date_time = 2017-08-18 11:59:59
then it shouldn’t get a result because 2017-08-18 20:00:00 is bigger than both dates instead of bigger than one and smaller than one.
The second example also seems to be ok.
If start_date_time = 2017-08-01 00:00:00
and $end_date_time = 2017-08-31 11:59:59
then 2017-08-18 20:00:00 is bigger than start_date_time and smaller than $end_date_time so it would show.
I don’t see anything wrong with this right now. This would give the result as expected (or i’m missing what the issue is…).
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!
© 2022 Advanced Custom Fields.