12 Jun
2018
12 Jun
'18
5:11 p.m.
I tried your query with the WHERE clause slightly simplified to give a non-empty result on my test installation of 18.05: WHERE (TO_DAYS(curdate())-TO_DAYS(date_due)) >= '' I was then able to download the CSV file and read it into LibreOffice Calc with no problems. So your query looks good; maybe take a look at the CSV file in an editor to see if there's anything strange about it. Or perhaps you have to tell your CSV import tool to use commas, and not semicolons or other delimiters (LibreOffice has several options for this).