I've been saving articles to a database but the date formats used by other people are not always the same format. So I use
strtotime("first day", strtotime($date));
to convert them all into unix date/time stamps.
Now heres the problem. I have a tag cloud that groups the dates up...but since its in the unix date/time stamp when I group it doesn't quite work. If a date in the database has the hour, it will not be grouped correctly even if it has the same day. For example date july 23, 2007 and july 23, 2007 12:10 will not group due to the time being added but dates july 24, 2007 12:10 and july 24, 2007 12:10 will.
Is there anyway to get rid of the hour part when grouping and just keep the month, day, year?
heres how I group the dates to make the tag cloud.
$query = "SELECT date AS tag, COUNT(id) AS quantity
FROM headlines
GROUP BY date
ORDER BY date DESC";
and loop through the results
while ($row = mysql_fetch_array($result)) {
$tags[$row['tag']] = $row['quantity'];
}