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

patchak’s picture

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

mediamash’s picture

i was thinking in that direction also, but i can't seem to get it right

these are my Date field(s):

Comment: Post date
Content: field_dates (field_dates) - From date
Content: field_dates (field_dates) - To date
Node: Last comment time
Node: Post date
Node: Updated date
Node revision: Created date
Node statistics: Most recent view
User: Created date
User: Last access
User: Last login

should i select both 'from date' and 'to date'

then 'Method':

Select OR - AND

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?

patchak’s picture

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..

mediamash’s picture

all dates are different in each node

i just want a list of nodes which date range (from/to cck) includes today/now

patchak’s picture

Well enter in the "relative" values for the filter "now"....

Please read the instructions on the filter.
Patchak

mvuijlst’s picture

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.