Click here to Skip to main content
15,926,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralList control and timers Pin
RobJones11-Oct-01 4:45
RobJones11-Oct-01 4:45 
GeneralRe: List control and timers Pin
Bill Wilson11-Oct-01 5:12
Bill Wilson11-Oct-01 5:12 
GeneralDate Conversions Pin
Derek Lakin11-Oct-01 4:22
Derek Lakin11-Oct-01 4:22 
GeneralRe: Date Conversions Pin
Jon Hulatt11-Oct-01 4:40
Jon Hulatt11-Oct-01 4:40 
GeneralRe: Date Conversions Pin
Tomasz Sowinski11-Oct-01 4:46
Tomasz Sowinski11-Oct-01 4:46 
GeneralRe: Date Conversions Pin
Jon Hulatt11-Oct-01 5:45
Jon Hulatt11-Oct-01 5:45 
GeneralRe: Date Conversions Pin
Tomasz Sowinski11-Oct-01 5:52
Tomasz Sowinski11-Oct-01 5:52 
GeneralRe: Date Conversions Pin
Carlos Antollini11-Oct-01 4:50
Carlos Antollini11-Oct-01 4:50 
I do that:

struct tm tpTime = { 0, 0, 0, 1, 0, 80};
time_t newtime;

tpTime.tm_mday += nDays;
newtime = mktime(&tpTime);

in newtime you have the time 1/1/1980 + nDays

and you have the correct date in the newtime struct
nDayofMonth = newtimw.tm_mday;
nMonth = newtime.tm_mon + 1; //(Jan = 0)
nYear = newtime.tm_year + 1900;



Good Luck...
note
Thiscode can fail because I wrote the code directly in codeproject. (I don't have a compiler here for test bugs....)



Carlos Antollini.
GeneralSending text to another window Pin
Sinoth11-Oct-01 3:52
Sinoth11-Oct-01 3:52 
GeneralRe: Sending text to another window Pin
Carlos Antollini11-Oct-01 4:14
Carlos Antollini11-Oct-01 4:14 
GeneralRe: Sending text to another window Pin
Nish Nishant11-Oct-01 5:07
sitebuilderNish Nishant11-Oct-01 5:07 
QuestionHow to do?? Pin
11-Oct-01 3:12
suss11-Oct-01 3:12 
AnswerRe: How to do?? Pin
Jon Hulatt11-Oct-01 3:59
Jon Hulatt11-Oct-01 3:59 
AnswerRe: How to do?? Pin
Carlos Antollini11-Oct-01 4:05
Carlos Antollini11-Oct-01 4:05 
QuestionAn easy TimeOut ? Pin
José Luis Sogorb11-Oct-01 0:13
José Luis Sogorb11-Oct-01 0:13 
GeneralDebugging internet application Pin
10-Oct-01 21:40
suss10-Oct-01 21:40 
QuestionHow to do?? Pin
10-Oct-01 21:32
suss10-Oct-01 21:32 
AnswerRe: How to do?? Pin
Christian Graus10-Oct-01 22:04
protectorChristian Graus10-Oct-01 22:04 
AnswerRe: How to do?? Pin
Bernhard10-Oct-01 23:37
Bernhard10-Oct-01 23:37 
AnswerRe: How to do?? Pin
Tomasz Sowinski11-Oct-01 2:11
Tomasz Sowinski11-Oct-01 2:11 
GeneralMemory Allocation Issues -- EXEs and DLLs Pin
Peter Weyzen10-Oct-01 18:49
Peter Weyzen10-Oct-01 18:49 
GeneralRe: Memory Allocation Issues -- EXEs and DLLs Pin
Paolo Messina10-Oct-01 23:25
professionalPaolo Messina10-Oct-01 23:25 
GeneralHiGlobal variable in VC++ Pin
10-Oct-01 18:42
suss10-Oct-01 18:42 
QuestionHow to Create and access Excel files programatically without using ODBC Pin
KMilind10-Oct-01 18:17
KMilind10-Oct-01 18:17 
AnswerRe: How to Create and access Excel files programatically without using ODBC Pin
Christian Graus10-Oct-01 18:39
protectorChristian Graus10-Oct-01 18:39 

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.