Abhilash Muthuraj
Abhilash Muthuraj

Reputation: 2028

date range in drupal-6 view arguments?

I have a view which loads certain goods elements on the view based upon start date and end date, what i need is a date range. Unfortunately in drupal arguments there is no range and filtering option.

I'm using only one table in mysql, which receive from and two date and returns specific items.

I tried this code, but it's not working. Is there any date-range filter which does the job or should I write my own filter?

function abc_display_screen() {
  $viewName = 'abc';
  $arg = '2008-01-04--2014-02-04';
  $viewsHtml .= views_embed_view($viewName, 'default', $arg);
  return $viewsHtml;
}

Upvotes: 2

Views: 672

Answers (2)

Jeremy French
Jeremy French

Reputation: 12157

I think the date module may do this for you. It has some views integration and I belive that this is something it does. However the versions you are using may cause some integration headaches at the moment.

Upvotes: 0

Simon
Simon

Reputation: 37978

Could you not use two filters instead?

Filter by dates below x and above y ?

Upvotes: 2

Related Questions