Hi. I have a MySQL db that has dates in it. 8-13-2002, 9-03-2003, 10-23-2003 for example.
I need to some how get only Distinct months using this date field.
8-2002, 9-2003, 10-2003 for example. Or the days can be left in there as long as thre is only 1 instance of each month.
Like if I had 3 entries for Oct 2003
2003-10-12
2003-10-22
2003-10-29
It would be fine if it returned
2003-10-12
as long as that was the only one returned with month of 10 and year of 2003.
Hope I am making sense.
So In other words the day of the month doesn't matter, I just need to get the individual Months and years.
Is there a way to do this with SQL? Or will I have to Pull every date from the DB and then parse it with PHP to get the individual months?
Thanks!😃