Task: I need to filter news by category and news creation date.

Filtering by category was easily implemented: In Edit View -> FILTER CRITERIA -> Content: Has taxonomy term

But news is not filtered by the date the news was created. For filtering by date, I chose the Edit View -> FILTER CRITERIA -> Taxonomy term: Post date

Today's news date:

enter image description here

When I enter the date in the field, no news is displayed:

enter image description here

I even tried adding additional hours and minutes, but that also didn't work.

The filter settings are as follows:

enter image description here

  1. Is this happening because my Content type News does not have a Date field? And it needs to be added to my Content type?
  2. Maybe in the FILTER CRITERIA I have to choose Content: Date filter instead of Taxonomy term: Post date?
  3. Am I entering the wrong date in the search field?
  4. Is there something wrong in the filter settings?
New contributor
ewik is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • The first question you need to answer before anyone can help you is: which date do you actually want to filter based on? Nodes (content) have a posted date, and you may have added fields to taxonomy or node that contain other dates. Which date are you trying to filter? Nov 25 at 14:14
  • @PatrickKenny I need to filter by the date the news was created. For example, I created 4 news today. Accordingly, when I enter the date 11/25/2021 in the field I want to get the news created today.
    – ewik
    Nov 25 at 14:29
  • Where is the News creation date stored? Nov 25 at 14:34
  • @PatrickKenny Honestly, I don't know where Drupal stored the date. Personally, I did not stored the date anywhere. Although when creating the news, I saw this: i.piccy.info/i9/ea7b079623e0b35e431c0bb7ca1e6110/1637851839/…
    – ewik
    Nov 25 at 14:50
  • Ok, that is the Post date, so you are filtering on the right item. What happens if you use a date like 2021-11-25? Nov 25 at 15:03

Your Answer

ewik is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.