重複の可能性:
2つのTDateTime変数をチェックしています
2つの日付の差を計算して、差を表示するのに問題があります。以前の質問を投稿しました。
私はreplaceTime関数の助けを求めています。これをどのように/なぜ使用する必要があるのかわかりません。
これが私のコードです:
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;