Let us say that this is my table in my database:
ID | APP_TIME | NAME
----------------------------------------------------
1 | 2012-07-08 10:00:00 | John
2 | 2012-07-08 12:00:00 | Johnny
3 | 2012-07-09 13:00:00 | Fred
4 | 2012-07-10 09:00:00 | George
5 | 2012-07-10 10:30:00 | Eva
6 | 2012-07-10 14:00:00 | Monica
7 | 2012-07-11 12:00:00 | Helen
8 | 2012-07-11 13:00:00 | Kim
What I then want to output at my site:
07-08-2012
Time | Name
----------------------------------------------------
10:00 | John
12:00 | Johnny
07-09-2012
Time | Name
----------------------------------------------------
13:00 | Fred
07-10-2012
Time | Name
----------------------------------------------------
09:00 | George
10:30 | Eva
14:00 | Monica
07-11-2012
Time | Name
----------------------------------------------------
12:00 | Helen
13:00 | Kim
My problem is not formatting the datetime values and all that…
The challenge for me is to list the results accordingly to the dates they “belong” to.
Someone help ? 🙂
Came up with this solution: