2

I am developing a project in Drupal 7, in this every content have date field by using the Date module.

I am trying to create a block by using the Views module in which I want to display content with its date field containing a date that is 'this week'.

How can I do this?

2 Answers 2

3

You simply add the filter criteria to view.

  • operator type: is greater than
  • value type: -7 days
1

Views and the various date modules are pretty slick in that you can "free form" a lot of the values: last week, this week, last tuesday etc all work in the filters. So you would select Date in the filters and then greater than, less than, etc and input what you needed in the to and or from fields.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.