joomla/joomla-cms — pull request #4017 by illovo (2014-07-27 16:36:20+00:00)
Title: Time Period set to Last Xyz throws MySQL error

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=34006&start=0

$nowDate will be quoted again in function $query->dateAdd(...) line 80. So, removed quoting in line 36.