Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Directory path validation problem Pin
kamalesh8212-Sep-07 3:07
kamalesh8212-Sep-07 3:07 
QuestionRe: Directory path validation problem Pin
David Crow12-Sep-07 3:26
David Crow12-Sep-07 3:26 
QuestionLAN cable plug-in/out events Pin
Sunil P V11-Sep-07 21:18
Sunil P V11-Sep-07 21:18 
QuestionRe: LAN cable plug-in/out events Pin
David Crow12-Sep-07 3:30
David Crow12-Sep-07 3:30 
QuestionHow do i resolve this unresolved external symbol Pin
monsieur_jj11-Sep-07 21:14
monsieur_jj11-Sep-07 21:14 
AnswerRe: How do i resolve this unresolved external symbol Pin
Hamid_RT11-Sep-07 21:20
Hamid_RT11-Sep-07 21:20 
QuestionRe: How do i resolve this unresolved external symbol Pin
David Crow12-Sep-07 3:32
David Crow12-Sep-07 3:32 
AnswerRe: How do i resolve this unresolved external symbol Pin
Mark Salsbery12-Sep-07 8:18
Mark Salsbery12-Sep-07 8:18 
Questionhow to change bitmap in on toolbar button? Pin
Neo Andreson11-Sep-07 21:13
Neo Andreson11-Sep-07 21:13 
AnswerRe: how to change bitmap in on toolbar button? Pin
Nishad S11-Sep-07 21:23
Nishad S11-Sep-07 21:23 
QuestionSocket Connection Through Internet Pin
shakumar_2211-Sep-07 21:12
shakumar_2211-Sep-07 21:12 
AnswerRe: Socket Connection Through Internet Pin
Jason Teagle11-Sep-07 22:18
Jason Teagle11-Sep-07 22:18 
AnswerRe: Socket Connection Through Internet Pin
GauranG Shah11-Sep-07 23:36
GauranG Shah11-Sep-07 23:36 
QuestionGet correct Time (Format) Pin
Programm3r11-Sep-07 21:06
Programm3r11-Sep-07 21:06 
AnswerRe: Get correct Time (Format) Pin
User 58385211-Sep-07 21:13
User 58385211-Sep-07 21:13 
QuestionRe: Get correct Time (Format) Pin
Programm3r11-Sep-07 21:35
Programm3r11-Sep-07 21:35 
AnswerRe: Get correct Time (Format) Pin
Programm3r11-Sep-07 21:37
Programm3r11-Sep-07 21:37 
AnswerRe: Get correct Time (Format) Pin
chandu00411-Sep-07 21:14
chandu00411-Sep-07 21:14 
GeneralRe: Get correct Time (Format) Pin
Programm3r11-Sep-07 21:27
Programm3r11-Sep-07 21:27 
AnswerRe: Get correct Time (Format) Pin
Nelek11-Sep-07 22:44
protectorNelek11-Sep-07 22:44 
In VC++ I use:

void CMyDoc::FormatTime ()
{ CTime time = CTime::GetCurrentTime();

CString szStartTime = time.Format ( "%A, %d.%B.%Y, %H:%M:%S" );

//Do whatever you want
return;
}


On the other hand... you can always make the conversion by yourself.

60 * 60 * 24 * 365 = 31536000 // Seconds in a year

60 * 60 * 24 = 86400 // Seconds in a day

3600 // Seconds in an hour

...............

TimeGenerated = 1183355639
int years = TimeGenerated / 31536000;
int rest1 = TimeGenerated % 31536000;

int day = rest1 / 86400;
int rest2 = rest1 % 86400;

and so on...

To get month, day of the week and other things you can work in a similar way.

I hope it helps

Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

Questioni have written my own collection class,some errors Pin
bhogavalli suresh11-Sep-07 19:56
bhogavalli suresh11-Sep-07 19:56 
AnswerRe: i have written my own collection class,some errors Pin
Cedric Moonen11-Sep-07 20:16
Cedric Moonen11-Sep-07 20:16 
AnswerRe: i have written my own collection class,some errors Pin
Hamid_RT11-Sep-07 20:47
Hamid_RT11-Sep-07 20:47 
AnswerRe: i have written my own collection class,some errors Pin
Nelek11-Sep-07 22:48
protectorNelek11-Sep-07 22:48 
AnswerRe: i have written my own collection class,some errors Pin
David Crow12-Sep-07 3:37
David Crow12-Sep-07 3:37 

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.