Closed (fixed)
Project:
Date
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2008 at 00:45 UTC
Updated:
14 Dec 2008 at 18:52 UTC
When you use try to filter a view by date (in postgres) you end up with a query filter like
(TO_CHAR(TO_DATE(node_data_field_date_availible.field_date_availible_value, 'FMYYYY-FMMM-FMDDTFMHH:FMMI:FMSS'), 'YY-MM-DD') >= '2008-11-28')
which causes a problem because 2008-11-28 is of the form YYYY-MM-DD.
Easiest way to fix this is to change sql_format() in date_api_sql.inc where you have
'Y' => 'YY', 'y' => 'Y',
change the line to
'Y' => 'YYYY', 'y' => 'Y',
patch attached
Thanks,
Steven H. Noble
| Comment | File | Size | Author |
|---|---|---|---|
| date_api_sql.inc.diff | 456 bytes | snoble |
Comments
Comment #1
yched commentedMoving to Date module - date fields handle their own integration with Views.
Please specify which exact version of Date you're using.
Comment #2
karens commentedOK, fix committed. Thanks!