Home › Forums › General Issues › show posts based on date and time fields › Reply To: show posts based on date and time fields
There really isn’t any way to do this with a single query. The reason being that if we look at the current time and compare it to a value stored in the database then every day will have times that are before and after the current time.
ACF does not currently have a datetime field, only a date field.
The first thing you’d need to do is to create an acf/save_post filter, in this filter you would need to create a third field that combines the date field and the time field into a single field with the format YYYY-MM-DD HH:MM:SS
then you have field that you can use in a query.
What type of field are you using for time field? Or are you using some type of date time add on field?
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.