Possible Duplicate:
Checking two TDateTime variables
I am having trouble calculating the difference between two dates and then displaying the difference. I have posted a previous question.
I am after help with the replaceTime function. I am not sure how/why I need to use this.
Here is my code:
TDateTime testFirstDate("11/09/2012");
TDateTime testFirstTime("14:00");
TDateTime testSecondDate("12/09/2012");
TDateTime testSecondTime("16:00");
TDateTime testCombined1 = ReplaceTime(testFirstDate,testFirstTime);
TDateTime testCombined2 = ReplaceTime(testSecondDate,testSecondTime);
TDateTime testDateDifference = testCombined2 - testCombined1;
std::cout << testDateDifference;