Click here to Skip to main content
15,896,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
QuestionGetting hold of certain event entries Pin
Programm3r11-Sep-07 19:46
Programm3r11-Sep-07 19:46 
AnswerRe: Getting hold of certain event entries Pin
carrivick12-Sep-07 8:50
carrivick12-Sep-07 8:50 
QuestionProblems about how to explore a program's action? Pin
kcynic11-Sep-07 19:34
kcynic11-Sep-07 19:34 
AnswerRe: Problems about how to explore a program's action? Pin
Cedric Moonen11-Sep-07 20:31
Cedric Moonen11-Sep-07 20:31 
GeneralRe: Problems about how to explore a program's action? Pin
kcynic11-Sep-07 21:33
kcynic11-Sep-07 21:33 
AnswerRe: Problems about how to explore a program's action? Pin
Hamid_RT11-Sep-07 20:48
Hamid_RT11-Sep-07 20:48 
GeneralRe: Problems about how to explore a program's action? Pin
kcynic11-Sep-07 21:33
kcynic11-Sep-07 21:33 
AnswerRe: Problems about how to explore a program's action? Pin
carrivick12-Sep-07 8:52
carrivick12-Sep-07 8:52 
Questionhow to upload a file on a server at a perticular location? Pin
AnayKulkarni11-Sep-07 19:14
AnayKulkarni11-Sep-07 19:14 
AnswerRe: how to upload a file on a server at a perticular location? Pin
Jason Teagle11-Sep-07 22:16
Jason Teagle11-Sep-07 22:16 
GeneralRe: how to upload a file on a server at a perticular location? Pin
AnayKulkarni12-Sep-07 0:14
AnayKulkarni12-Sep-07 0:14 
QuestionRe: how to upload a file on a server at a perticular location? Pin
David Crow12-Sep-07 3:40
David Crow12-Sep-07 3:40 

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.