Thanks for those who actually helped and tried to understand what I was asking, noone actually gave me information I used, but I figured it out on my own. I actually decided it was more benificial to my project to just sum it from midnight to midnight. Heres how I got it to work if you're interested:
Code:
GetSystemTime (&hour, &minute, &second);
if((hour == 0 ) & (datecount == 0))
{
datecount = 1;
sumday = 0;
}
if (hour != 0)
{
sumday = (sumday + radiation);
datecount++;
result = SetCtrlVal(mainpanel, MAINPANEL_SUM_DAY, sumday);
datecount = 0;
}