This could be a views bug/malconfiguration, but i figured i would start here.
I have a view and I have set 2 filters.
The first one is "Content: All Day Occurrence (field_event_allday_occurrence) - From date <= now "
and the second is "Content: All Day Occurrence (field_event_allday_occurrence) - To date >= now "
With the idea that I want nodes that the "From" date has past, and the "To" date has not. Thus giving me a list of nodes where today is within its date range.
Problem being, if i have just the first filter, the From date <= now, it works as expected, only nodes with a from date less then today show up. Once I add the second filter, I just get all nodes with this particular date field, regardless of when the To or From date occurs.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | view_export.txt | 21.13 KB | primsi |
Comments
Comment #1
dawehnerDid you selected OR or AND, at the bottom of the date filter.
Additional i strongly suggest to export your view. This helps peolpe really a lot!
Comment #2
mikeytown2 commentedI'm also experiencing this issue; I have the node creation timestamp. I want to display all nodes created from 8pm yesterday to 8pm today (24hr time block). So Create a filter
filter Date: Date (node)
Granularity: hour
Date field(s): Node: Post date
Method: AND
Operator: is between
Date default: yesterday 8pm
To date default: today 8pm
And it should only display nodes that where created between these 2 time stamps correct? Problem is when its 10pm I still get nodes created from today at like 1pm; they don't disappear until its the next day 12:01 am; seems like Granularity of hour is not being respected. SQL appears correct though...
Any ideas?
Comment #3
primsi commentedI have a similar problem. Two page displays: one showing nodes 'Date < now', the other one showing 'Date >= now'.
Edit 1: some more info
'Date < now - shows no nodes
Date >= now - shows nodes correctly
Edit 2: Just upgraded Views to 6.x-2.8 and everything seems to work.
Comment #4
cangeceiro commentedmy problem was the OR/AND operator...epic fail.