Click here to Skip to main content
15,914,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRunAnHTMLFile Pin
akram mirzaei7-Mar-06 1:17
akram mirzaei7-Mar-06 1:17 
AnswerRe: RunAnHTMLFile Pin
Nibu babu thomas7-Mar-06 1:25
Nibu babu thomas7-Mar-06 1:25 
AnswerRe: RunAnHTMLFile Pin
Hamid_RT7-Mar-06 1:27
Hamid_RT7-Mar-06 1:27 
GeneralRe: RunAnHTMLFile [edited] Pin
toxcct7-Mar-06 1:42
toxcct7-Mar-06 1:42 
QuestionIP Pin
J51219827-Mar-06 0:28
J51219827-Mar-06 0:28 
AnswerRe: IP Pin
toxcct7-Mar-06 0:31
toxcct7-Mar-06 0:31 
GeneralRe: IP Pin
J51219827-Mar-06 3:22
J51219827-Mar-06 3:22 
Questionproblems with CTime calculation Pin
Neil scsn7-Mar-06 0:13
Neil scsn7-Mar-06 0:13 
Hi,
Im using the CTime to calculate the date when adding number of days. The
strange thing is that when I add 58 and 59 days to the same date it returns
the same date. Here is the small code:

void DateCalc(int Days)
{
int Date=1;
int Month=9;
int Year1,Month1,Day1;

CTime Check( 2006, Month,Date,0,0,0);
Check+=CTimeSpan( Days,0,0,0);

Year1=Check.GetYear();
Month1=Check.GetMonth();
Day1=Check.GetDay();
TRACE("Year %d Month %d Date %d\n",Year1,Month1,Day1);
}


... function(...)
{
DateCalc(58); //add 58 days to 1/9/2006
DateCalc(59); //add 59 days to 1/9/2006

Both TRACE(..) functions within DateCalc(..) displays :

Year 2006 Month 10 Date 29
Year 2006 Month 10 Date 29


Anyone explain this?
Neil


AnswerRe: problems with CTime calculation Pin
Nibu babu thomas7-Mar-06 1:07
Nibu babu thomas7-Mar-06 1:07 
GeneralRe: problems with CTime calculation Pin
Neil scsn7-Mar-06 3:04
Neil scsn7-Mar-06 3:04 
GeneralRe: problems with CTime calculation Pin
David Crow7-Mar-06 3:10
David Crow7-Mar-06 3:10 
GeneralRe: problems with CTime calculation Pin
Neil scsn7-Mar-06 3:21
Neil scsn7-Mar-06 3:21 
AnswerRe: problems with CTime calculation Pin
Graham Bradshaw7-Mar-06 2:53
Graham Bradshaw7-Mar-06 2:53 
AnswerRe: problems with CTime calculation Pin
David Crow7-Mar-06 3:24
David Crow7-Mar-06 3:24 
QuestionFinding number of bits set in a given number Pin
Amar Sutar7-Mar-06 0:09
Amar Sutar7-Mar-06 0:09 
AnswerRe: Finding number of bits set in a given number [fixed] Pin
toxcct7-Mar-06 0:20
toxcct7-Mar-06 0:20 
GeneralRe: Finding number of bits set in a given number Pin
Stephen Hewitt7-Mar-06 0:48
Stephen Hewitt7-Mar-06 0:48 
GeneralRe: Finding number of bits set in a given number Pin
toxcct7-Mar-06 0:51
toxcct7-Mar-06 0:51 
GeneralRe: Finding number of bits set in a given number [fixed] Pin
David Crow7-Mar-06 3:42
David Crow7-Mar-06 3:42 
GeneralRe: Finding number of bits set in a given number [fixed] Pin
toxcct7-Mar-06 3:44
toxcct7-Mar-06 3:44 
AnswerRe: Finding number of bits set in a given number Pin
Stephen Hewitt7-Mar-06 0:32
Stephen Hewitt7-Mar-06 0:32 
GeneralRe: Finding number of bits set in a given number Pin
toxcct7-Mar-06 0:34
toxcct7-Mar-06 0:34 
GeneralRe: Finding number of bits set in a given number Pin
Stephen Hewitt7-Mar-06 0:52
Stephen Hewitt7-Mar-06 0:52 
GeneralRe: Finding number of bits set in a given number Pin
toxcct7-Mar-06 0:56
toxcct7-Mar-06 0:56 
GeneralRe: Finding number of bits set in a given number Pin
Stephen Hewitt7-Mar-06 3:06
Stephen Hewitt7-Mar-06 3:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.