Genius! Of course. That is correct. It would be better I think to store the date as a time stamp, select for the max on that and then format the date for display.
Thanx for the replies. I’m sure I would have been scratching my head for some time otherwise . I love these communities.
It probably has to do with DATE_FORMAT(created, ‘%b %e’)
%b is a the short name of the month, ie. Jan … Dec
Since the months of the year are not ordered alphabetically you indeed have Feb < Jan, while in actuality it’s the other way around.
Therefore I’d say both MIN and MAX don’t work, depending on the available data you can get unexpected results.
Could you make it DATE_FORMAT(MAX(created), ‘%b %e’) ?
I’m not 100% sure if that works, but if it does that should solve your problem
Thanks for the quick response. This is of course exactly what I thought, however, it is not doing that. It seems that the exact opposite is happening on my site. I noticed that the 1st date was being shown not the last date ie today when using MAX. I changed the script to MIN and it started showing the last date.
This was the reason for my question, I can’t work out why MIN gives me the last date and MAX gives the first date…very strange