I am trying to create a Block view that shows posts within the last 2 days.

While creating the filter based on the date ..I am confused .

The instructions say


"This filter allows events to be filtered by their date. Enter dates in the format: . Enter 'now' to use the current time. You may enter a delta (in seconds) to the option that will be added to the time; this is most useful when combined with now. If you have the jscalendar module from jstools installed, you can use a popup date picker here."

But I have only one Text box where I can add the "now" where do I add the "delata"

I am condused.

Can I get any tutorial or any help in creating this filter ..Thank you.

Comments

level02’s picture

The filter you are referring to is related to events.

This filter allows events to be filtered by their date

Maybe your option text box isn't showing because of the theme you are using. The option box is where you add the delata. Try changing the admin theme, scrolling horizontally or shrinking your text.

...If you want to have a block that shows all nodes within the last 2 days choose the 'Node: Created Time' filter. Add two of these filters... Their instructions read:

This filter allows nodes to be filtered by their creation date. The "Value" can either be a date in the format: CCYY-MM-DD HH:MM:SS or the word "now" to use the current time. You may enter a positive or negative number in the "Option" field that will represent the amount of seconds that will be added or substracted to the time; this is most useful when combined with "now". If you have the jscalendar module from jstools installed, you can use a popup date picker here.

Make the two filters like this:

1) Node: Created Time - Is less than or equals - Value: now
2) Node: Created Time - Is greater than or equals - Value: now - Option: -172800

(2 Days = 172800 seconds)

There is also a module for this called Views Date Range Filter.