Have just tried to show some records with my date_added field set to NOW and I get the following error: er_wrong_value: incorrect date value when I execute query.
I had a query which showed records records between two dates, Now and -60 days. This query has stopped working recently having worked for several months. The simple query above is an attempt to figure out what’s going wrong.
Original query was date.date_added between {{NOW.dateAdd(‘days’,-60}} AND {{NOW}}
The above no longer shows any records even when there are records within this day period.
Thank you all for your suggestions, below are some images to try and explain clearly whats happening.
Firstly may I reiterate, my query worked perfectly until very recently, I can’t be specific as to when it stopped working as I don’t watch what the page is doing on a daily basis.
I have now created a test query with only the between date condition to make sure nothing else is effecting the result.
If setup the date.added field to look between two dates, {{NOW.dateAdd(‘days’,-60)}} AND {{NOW}}, when I run the ‘execute query’ within the database query builder I get no resultswhen there are clearly plenty of records that should be there;
If I do a very simple query to just show all records for today, data.added EQUALS {{NOW}} I get the following error in the ‘execute query’ within the database query manager;
So the problem is that in the query builder when you test your query, using {{NOW}} expression as a value you see the error?
Have you tried adding real date values instead… ?
Is there any issue at all when running your server action in the browser?
If I run the very simple query {{NOW}} I get the correct result of the three records with todays date.
I have also just tried the more complex BETWEEN query {{NOW.dateAdd(‘days’,-60)}} AND {{NOW}}, it is now showing results in the test page so my matter is resolved.
Guess its an issue with the ‘execute query’ within Database Query Manager, I’ll wait for an update before using it again.