Article ID: 167338
Article Last Modified on 11/21/2006
COleDateTimeSpan span;
// Set to 1 day 2 hours 3 minutes and 4 seconds
span.SetDateTimeSpan(1,2,3,4);
CString str;
str = span.Format("%D;%H;%M;%S"); // BUG:Day(s) is not found in CString
// Following is equivalent to the above
str.Format("%02d;%s", span.GetDays(),
(LPCTSTR)span.Format("%H;%M;%S"));
COleDateTime time;
time = COleDateTime::GetCurrentTime();
str = time.Format("%D;%H;%M;%S"); // BUG:Day is not found in CString
// Following is equivalent to the above
str.Format("%02d;%s", time.GetDay(),
(LPCTSTR)time.Format("%H;%M;%S"));
(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Yeong-
Kah Tam, Microsoft Corporation
Additional query words: kbVC420bug kbDSupport COleDateTime COleDateTimeSpan Format Day
Keywords: kbbug kbcode KB167338