itertools.groupby is your dear, dear friend:
import itertools
dates = [
(1,'2009-01-01 10:15:23'),
(2,'2009-01-01 13:21:29'),
(3,'2009-01-02 01:03:13'),
(4,'2009-01-03 12:20:19'),
(5,'2009-01-03 13:01:06'),
]
for key,group in itertools.groupby(dates, key=lambda x: x[1][:11]):
print key
for element in group:
print ' ', element
The above code prints the following:
2009-01-01
(1, '2009-01-01 10:15:23')
(2, '2009-01-01 13:21:29')
2009-01-02
(3, '2009-01-02 01:03:13')
2009-01-03
(4, '2009-01-03 12:20:19')
(5, '2009-01-03 13:01:06')