I got an Oracle database statement which displays the data of the last 7 days in my script
The statement is :
select * from TABLE_NAME
WHERE DATETIME BETWEEN to_char((sysdate-7,MM), 'DDMMYYYY%') AND to_char((sysdate,MM), 'DDMMYYYY%')
ORDER BY DATETIME ASC;
But, this output gives me the results of the previous months data on that particular week
How to get only this months data and not the previous months data
