Hi All --
I have db with multiple date entries (ie. 2005-02-27). These entries have times associated with them.
I am trying to have all entries with the same date, calculate the time spent.
I have the time calculation solved. My problem is that the multiple dates show up multiple times!! VERY FRUSTRATING!
How can I have a loop of some kind loop when the dates equal themselves and go on to the next date when the loop is finished?
I am using
SELECT * FROM table WHERE date BETWEEN '2005-02-25' and '2005-03-01'
ie --
2005-02-27 - 10:00 - 12:00
2005-02-27 - 12:00 - 16:00
2005-02-27 - 16:00 - 17:30
2005-02-28 - 11:00 - 13:00
etc...
The results I am looking for are :
Date: 2005-02-27
Duration: 5:30
Date: 2005-02-28
Duration: 2:00
etc...
Right now, I am getting 3 entries for 2005-02-27 and 1 for 2005-02-28.
I only want 1 entry for each.. but totalled like above.
Thanks in advance.
Mike