By Coupon Code Swap on
I'm looking for a way to filter a view so that content with a specified date that is older than the current date / time is not included in the view. I'm using the date module for views to add a future date. Once that future date is older than the current date, I'd like to have it automatically filtered out from the view. Is this possible?
Comments
Possible
Okay. Figured this out and it is possible. Just takes some time and experimenting to figure out how to use the views module. Very amazing how much flexibility there is.
------------------------------------
Themebot - Drupal themes and free web layouts
Coupons or Deals - Be a cheapskate and feel great
So what did you do to get
So what did you do to get this solved?
Filtering
I added a filter for the expiration date I had set. The filter is set to only show nodes greater than or equal to "now", based on the expiration field.
------------------------------------
Dell Coupons | Lenovo Coupons - Be a cheapskate and feel great!
Themebot - Drupal Themes
Re: Filtering
I'm trying to do the same thing for an event list. Can you be any more specific about how you did it? So far, I don't see any way to use the "filters" option. It doesn't show my date field as an option. The "sort criteria" shows the date field as an option so I'm not sure why filters can't see it.
Anyway, if someone could point to a step-by-step on how do this that would be great. Thanks!
Filter by Date
For anyone who comes across this, I just had the same problem - my CCK date field was showing up as an option under Filters - and I figured out the answer is to filter by Date:Date. That will give you options to choose which field on the node (including custom cck fields) you want to use as your date. Then you can set if you want the date to be less than, greater than, or equal to a relative or absolute value.
Thank you
Good explanation, a bit tricky before you relize that Date fields are put together under date, while all other custom fields are under content.... Thanks again.
Filtering out
I can't get this to work. I use date:date and set the filter to equal or greater than, and apply the relative value 'now' (see screenshot). The resulting view still shows dates older than today. Why?
Screenshot:
http://pesh.no/personlig/date_filter.png
Filtering not working for me either.
I can filter by node type, by node published (yes), but when I try Date:Date with From date < now, I still get future dates showing up in my View. I tried making the dates absolute, and that worked, but naturally this isn't something I'd like to update manually on a daily basis. Is this is a bug? Anyone else besides perandre having the same issue?
Update Date module
@Blue Muse: This was a bug in Date module, and is fixed in the dev release. Enjoy :)
thanks perandre, but still not working
I downloaded the latest dev version, but I still have the same problem. My view continues to show events that are upcoming, when I have set it to show only events less than now.