Hello,
I was encountering problems filtering by the Date field in Views using 6.x-2.0-beta3. I upgraded to 6.x-2.x-dev, as suggested on http://drupal.org/node/279997, but my specific issue still persists. If I have more than one filter using a Date field in Views, I get an error like:
user warning: Unknown column 'node_data_field_content_start_date.field_content_start_date_valu' in 'field list' query: SELECT node.nid AS nid, node_data_field_content_end_date.field_content_end_date_value AS node_data_field_content_end_date_field_content_end_date_value, node_data_field_content_end_date.field_content_end_date_value2 AS node_data_field_content_end_date_field_content_end_date_value2, node_data_field_content_start_date.field_content_start_date_value AS node_data_field_content_start_date_field_content_start_date_value, node_data_field_content_start_date.field_content_start_date_value2 AS node_data_field_content_start_date_field_content_start_date_value2, node.title AS node_title, node.type AS node_type, node_data_field_content_end_date.field_duration_value AS node_data_field_content_end_date_field_duration_value, node_data_field_content_end_date.nid AS node_data_field_content_end_date_nid, node_data_field_content_end_date.field_order_number_value AS node_data_field_content_end_date_field_order_number_value FROM node node LEFT JOIN content_type_screen_content node_data_field_content_end_date ON node.vid = node_data_field_content_end_date.vid WHERE (node.type in ('screen_content')) AND (DATE_FORMAT(STR_TO_DATE(node_data_field_content_end_date.field_content_end_date_value, '%Y-%m-%dT%T'), '%Y-%m-%d') >= '2008-07-22') AND (DATE_FORMAT(STR_TO_DATE(node_data_field_content_start_date.field_content_start_date_value, '%Y-%m-%dT%T'), '%Y-%m-%d') <= '2008-07-22') ORDER BY node_data_field_content_end_date_field_order_number_value ASC in /usr/webserver/content/drupal/docs/sites/all/modules/views/includes/view.inc on line 642.
For the record, I have two date fields (content_start_date and content_end_date) and I wish to filter content so only those where the current date is between the start and end date are used for the view. Any assistance would be appreciated.
Comments
Comment #1
karens commentedDuplicate of http://drupal.org/node/269569.