Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there a way to filter by the node creation date, but instead of saying greater than or less than a certain date I can say greater than or less than 7 days, so I can have a 'weekly' block?
Comments
Comment #1
JuliaKM CreditAttribution: JuliaKM commentedYou can do this with the node creation date by using the date value and option. For example, if you would like to show all nodes created in the last 7 days, you would enter the following into your date filter:
- operator: greater than or equal to
- value: now
- option: -604800
In other words, you are now filtering for nodes that have a date that is between now and today minus the last 7 days (604,800 seconds).
Comment #2
GameCollision CreditAttribution: GameCollision commentedCool, thank you very much. :)
Comment #3
JuliaKM CreditAttribution: JuliaKM commentedComment #4
JuliaKM CreditAttribution: JuliaKM commentedComment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.