Question
Showing unique dates with multiple events
I have a series of calendar events that I'm pulling from a
database, and each of them has an associated datestamp. Basically,
I want to be able to compact the dates, so that each unique date is
listed only once. I would like to present them in a format that
looks something like this:
Nov. 23: Pumpkin Festival
Comic Book Convention
Nov. 24: Woodworker's Presentation
Gallery Showing
Engineering Conference
Nov. 26: Music Festival
Right now, each event has to have a date associated with it. Like so:
Nov. 23: Pumpkin Festival
Nov. 23: Comic Book Convention.
You can see, they're both on November 23rd.
I've attached the code I'm using to pull the database. It's pulling events within a 31-day time period. Also, I've got variables that break up the datestamp into individual parts, so I just need to figure out how to show each unique date only once.
Nov. 23: Pumpkin Festival
Comic Book Convention
Nov. 24: Woodworker's Presentation
Gallery Showing
Engineering Conference
Nov. 26: Music Festival
Right now, each event has to have a date associated with it. Like so:
Nov. 23: Pumpkin Festival
Nov. 23: Comic Book Convention.
You can see, they're both on November 23rd.
I've attached the code I'm using to pull the database. It's pulling events within a 31-day time period. Also, I've got variables that break up the datestamp into individual parts, so I just need to figure out how to show each unique date only once.