By mediamash on
Can someone explain how you filter a list of nodes through a from/to-date CCK-field?
I created a cck field with option from date/to date. The view i want is a list of nodes who have today's date in between the cck fromdate/to date. How do i do that with the date module? Is it possible to refer to the 2 fields inside Views?
Comments
Just add a new "Date" filter
Just add a new "Date" filter to your view...
Then, select the right date field you want to use
Then, select the option "In between" and you can hardcode values or use relative values!
Hope this helps,
Patchak
i was thinking in that
i was thinking in that direction also, but i can't seem to get it right
these are my Date field(s):
should i select both 'from date' and 'to date'
then 'Method':
When i choose the operater 'in between' and i want to use the dates from my CCK field ('from date' and 'to date'), which values do i use then?
Just enter the dates you want
Just enter the dates you want in the filter. If you want the user to be able to choose, you need to click on "expose". Otherwhise you need to provide values on the field itself.
It can't get the values from nodes there, cause this is a filter, not a field..
all dates are different in
all dates are different in each node
i just want a list of nodes which date range (from/to cck) includes today/now
Well enter in the "relative"
Well enter in the "relative" values for the filter "now"....
Please read the instructions on the filter.
Patchak
To get all nodes where "now"
To get all nodes where "now" is between From Date and To Date, you don't need begin and end date.
Just find all nodes where the end date is today or in the future: apparently, if there is no end date, the end date is automatically set to the begin date -- so this will also find all of today's events.
Select "Content: field_dates (field_dates) - To date". Set accuracy to "dday", select either AND or OR, and then "is greater than or equal to" as the operator, and "now" as the date.