Simple Man
Member
- Joined
- Jul 7, 2010
- Messages
- 13
- Programming Experience
- 5-10
Looking for some ideas on how to average my data by 1/2 increments.
We've got a weather station and the data is written to a sql database every 2 minutes. I need to someone average the data by 1/2 hour increments. So, data between 3pm and 3:30pm need to be averaged for the 3:30pm time. 3:30pm to 4pm needs to be avg for the 4pm reading, etc.
The 1/2 readings will be for a data export that I will provide based on date criteria.
Anyone have an idea on how I should approach this? Not sure if I should do this using SQL or just code it in vb.net and then export it.
Doing this hourly would be a lot simpler because I could group it by the hour....but having the do this for 1/2 hours throws a little wrinkle in it.
Thoughts?
Thanks.
Nick
We've got a weather station and the data is written to a sql database every 2 minutes. I need to someone average the data by 1/2 hour increments. So, data between 3pm and 3:30pm need to be averaged for the 3:30pm time. 3:30pm to 4pm needs to be avg for the 4pm reading, etc.
The 1/2 readings will be for a data export that I will provide based on date criteria.
Anyone have an idea on how I should approach this? Not sure if I should do this using SQL or just code it in vb.net and then export it.
Doing this hourly would be a lot simpler because I could group it by the hour....but having the do this for 1/2 hours throws a little wrinkle in it.
Thoughts?
Thanks.
Nick