I am trying to create a grafted field in my __SQL__ directive in fields.ini to determine the "week ending" date. The query snippet below works fine in MySQL to display the date of Friday for any given week, but I am getting the following error:
The Error was Parse error: Expected an expression and unit for the interval on line 1 SELECT t.*, WEEK(myDate,5) AS weekNum, DATE_ADD(myDate, INTERVAL (6-DAYOFWEEK(myDate)) DAY) AS weekEnd ...
Any suggestions? Is this a parser bug, or is there another way I should write this query?
Thanks,
Alan