I am working on a query formula in google sheets. I am trying to get the WHERE part of the query to end at the end of the last month. I am getting a parse error at 'TEXT(EOMONTH(now(), -1),"yyyy-mm-dd")'. I know that is the portion that is failing because if I replace it with a date (2021-07-31) the query works.
Thanks in advance.
=QUERY(Transactions!A:Z, " SELECT K, -1 * SUM(E) WHERE F LIKE 'Investing' AND B > DATE '2020-05-31' AND B < DATE 'TEXT(EOMONTH(now(), -1),"yyyy-mm-dd")' GROUP BY K LABEL -1 * SUM(E) 'Investments' FORMAT K 'yyyy-MMM', -1 * SUM(E) '$#,##0.00' ")"))"