I'm working on building a view right now that filters out "events" that have a node id reference that matches my argument and a date within a date argument with a range specified by default. For one reason or another it is not displaying any dates past the end of the year, so everything cuts off at 2010. The query that is being created is below. For the argument, I currently have the defaults set to the current date and the range set to months, -3:+7 and have the field selected to the proper date node content item.
Also, When I set the argument to a range of days -1:+30 I get zero results. I am also attaching that query second.
I hope I've provided enough info to get a grip on this. Thanks for the helps.
SELECT node.nid AS nid,
node.title AS node_title,
node_data_field_event_date.field_event_date_value AS node_data_field_event_date_field_event_date_value,
node.type AS node_type,
node.vid AS node_vid
FROM node node
LEFT JOIN content_type_any_event node_data_field_event_venue_reference ON node.vid = node_data_field_event_venue_reference.vid
LEFT JOIN content_type_any_event node_data_field_event_date ON node.vid = node_data_field_event_date.vid
WHERE (node_data_field_event_venue_reference.field_event_venue_reference_nid = 1079)
AND ((DATE_FORMAT(STR_TO_DATE(node_data_field_event_date.field_event_date_value, '%Y-%m-%dT%T'), '%Y-%m') <= '2010-12' AND DATE_FORMAT(STR_TO_DATE(node_data_field_event_date.field_event_date_value, '%Y-%m-%dT%T'), '%Y-%m') >= '2010-12'))
ORDER BY node_data_field_event_date_field_event_date_value ASC
second query with date range to days
SELECT node.nid AS nid,
node.title AS node_title,
node_data_field_event_date.field_event_date_value AS node_data_field_event_date_field_event_date_value,
node.type AS node_type,
node.vid AS node_vid
FROM node node
LEFT JOIN content_type_any_event node_data_field_event_venue_reference ON node.vid = node_data_field_event_venue_reference.vid
LEFT JOIN content_type_any_event node_data_field_event_date ON node.vid = node_data_field_event_date.vid
WHERE (node_data_field_event_venue_reference.field_event_venue_reference_nid = 1079)
AND ((DATE_FORMAT(STR_TO_DATE(node_data_field_event_date.field_event_date_value, '%Y-%m-%dT%T'), '%Y-%m-%d') <= '2010-12-08' AND DATE_FORMAT(STR_TO_DATE(node_data_field_event_date.field_event_date_value, '%Y-%m-%dT%T'), '%Y-%m-%d') >= '2010-12-08'))
ORDER BY node_data_field_event_date_field_event_date_value ASC
Comments
Comment #1
dawehnerMove to date module issue queue
Comment #2
Abeaudrian commentedI am having the same problem.
Comment #3
nateb commentedSeeing the same thing. I seem to recall earlier versions of the module not having this problem. At which point did this break?
Comment #4
Abeaudrian commentedHey
Think I may have found the problem in this post http://drupal.org/node/813072
Seems you cannot share the date filed across different content types as the different settings will cause a conflict. So will need to create a new field for each content type.
Regards
Adrian
Comment #5
karens commentedSounds like it was fixed. Please close issues if you find solutions. Thanks.