Can somebody help me with my report view problem. I need to view monthly organization report. I do get the report for one month but the problem is it didn't take the first day of the month as the initial. from the day the report has been generate, it is just count 30 days backward. therefore it will take the report for the previous month too since it didn't start from 1 day of every month. this is the code that i used.
SELECT *
FROM aduan_form
WHERE tarikh >= SUBDATE(SYSDATE(), INTERVAL 30 DAYS)
i know there is something wrong with it, i already try to add the format in sysdate() which is :
SELECT *
FROM aduan_form
WHERE tarikh >= SUBDATE(SYSDATE('%Y-%m-01'), INTERVAL 1 MONTH)
but the result still the same. how can i fix this problem?