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?