Hi,
I am trying to show records from a table which are less than 1 year old based on month. I have gotten close with this sql statement:
select date_added from sales_records WHERE date_added > DATE_ADD("2002-06-25",INTERVAL - 1 YEAR);
Using this example though, I get results from 2001-06-24 on. What I want to show is July of last year through where we are currently in June. I don't want to show any partial month's records like I am getting now.
In other words, I am now getting June 24, 2001 through June 25, 2002. What I want is to omit all of June 2001 and start with the first full month following, in this example July 2001, through current records added for June 2002.
Any suggestions would be greatly appreciated.
Thank you,
Mark