Erindesign
04-04-2010, 05:04 PM
Hey all,
I have a script that keeps track of my spendings during the day. Each spending will have a NOW() Datetime stamp.
If I was to do a "summary", I would want all spendings to addup for each day. How would I accomplish this?
ex:
ID | Amount | Datetime
1 | 25 | 2010-04-03 04:08:44
2 | 30 | 2010-04-03 03:25:12
3 | 15 | 2010-04-06 04:07:59
4 | 90 | 2010-04-06 04:08:44
5 | 10 | 2010-04-06 04:08:44
output:
Date | Amount
2010-04-03 | 55
2010-04-06 | 115
I don't know how many instances per date, I don't know if each date has an instance.
I have a script that keeps track of my spendings during the day. Each spending will have a NOW() Datetime stamp.
If I was to do a "summary", I would want all spendings to addup for each day. How would I accomplish this?
ex:
ID | Amount | Datetime
1 | 25 | 2010-04-03 04:08:44
2 | 30 | 2010-04-03 03:25:12
3 | 15 | 2010-04-06 04:07:59
4 | 90 | 2010-04-06 04:08:44
5 | 10 | 2010-04-06 04:08:44
output:
Date | Amount
2010-04-03 | 55
2010-04-06 | 115
I don't know how many instances per date, I don't know if each date has an instance.