// Get Start Time
// Get End Time
// Get Start Day
//Get End Day
// Set Times up for Calculation
CTimeSpan tsStart(stStartDay.wDay, stStart.wHour, stStart.wMinute, stStart.wSecond);
CTimeSpan tsEnd(stEndDay.wDay, stEnd.wHour, stEnd.wMinute, stStart.wSecond);
// Perform Calulation of total time worked
CTimeSpan temp = tsEnd - tsStart;
pretty much just wanting to subtract 2 SYSTEMTIME struct from each other to get the time difference between them in order to calculate how long i've worked for a certain day! from the above code after the calculations are performed i can call temp.GetTotalHours()
and it will return the correct ammount of hours i worked for a particular day. For some reason when i call temp.GetTotalMinutes() or even temp.GetMinutes() it always returns 0!!!! which is wrong when i alter the minute value of the SYSTEMTIME structs.
Does anyone have any idea what i'm doing wrong in the above calculation? like i said im just wanting to subtract 2 times in order to get the hours and minutes i worked for a particular day
the above calculation does work...it's something in my print statement. For some reason the 2nd variable in the format statement always returns 0??? any ideas?