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

C / C++ / MFC

 
AnswerRe: CComboBox - DropList Style- Horizontal Scrollbar? Pin
David Crow21-Apr-06 6:21
David Crow21-Apr-06 6:21 
Question[Message Deleted] Pin
sherton21-Apr-06 4:38
sherton21-Apr-06 4:38 
AnswerRe: System () in vc++ 6.0 Pin
toxcct21-Apr-06 4:52
toxcct21-Apr-06 4:52 
GeneralRe: System () in vc++ 6.0 Pin
sherton22-Apr-06 0:39
sherton22-Apr-06 0:39 
GeneralRe: System () in vc++ 6.0 Pin
super_ttd22-Apr-06 6:24
super_ttd22-Apr-06 6:24 
AnswerRe: System () in vc++ 6.0 Pin
David Crow21-Apr-06 4:54
David Crow21-Apr-06 4:54 
AnswerRe: System () in vc++ 6.0 Pin
Aqueel21-Apr-06 5:23
Aqueel21-Apr-06 5:23 
QuestionShortDate in MFC Pin
QuickDeveloper21-Apr-06 4:33
QuickDeveloper21-Apr-06 4:33 
hi
I need to get the date as follows

Desired output eg:current date and time : 4/18/06 2:25:02PM

I used the following code but i want to know whether it's AM or PM and also i want the time in 12:00 format not 24:00hrs.

COleDateTime dtCurrentDate ;
dtCurrentDate = COleDateTime::GetCurrentTime() ;

strDate.Format(_T("%d/%d/%d\t"),dtCurrentDate.GetMonth(),dtCurrentDate.GetDay(),dtCurrentDate.GetYear()) ;

strTime.Format(_T(" %d:%d:%d"),dtCurrentDate.GetHour(),dtCurrentDate.GetMinute(),dtCurrentDate.GetSecond()) ;

strDesc += _T("current date and time")+ strDate + strTime;

thanx in advance





"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"



-- modified at 10:54 Friday 21st April, 2006
AnswerRe: ShortDate in MFC Pin
James R. Twine21-Apr-06 4:50
James R. Twine21-Apr-06 4:50 
AnswerRe: ShortDate in MFC Pin
Roger Stoltz21-Apr-06 4:55
Roger Stoltz21-Apr-06 4:55 
Questionlistview position after inserting an item Pin
karfi21-Apr-06 3:57
karfi21-Apr-06 3:57 
QuestionDisabling Wireless while on network Pin
lynchspawn21-Apr-06 3:33
lynchspawn21-Apr-06 3:33 
QuestionInformation on cells of a CListctrl Pin
Sandeep A.C21-Apr-06 3:22
Sandeep A.C21-Apr-06 3:22 
AnswerRe: Information on cells of a CListctrl Pin
Naveen21-Apr-06 3:36
Naveen21-Apr-06 3:36 
AnswerRe: Information on cells of a CListctrl Pin
James R. Twine21-Apr-06 4:43
James R. Twine21-Apr-06 4:43 
Questionquery on domodal dialogboxes Pin
swapna_signsin21-Apr-06 3:07
swapna_signsin21-Apr-06 3:07 
AnswerRe: query on domodal dialogboxes Pin
includeh1021-Apr-06 3:13
includeh1021-Apr-06 3:13 
GeneralRe: query on domodal dialogboxes Pin
includeh1021-Apr-06 3:40
includeh1021-Apr-06 3:40 
QuestionI/O to a file Pin
CPP91121-Apr-06 2:55
CPP91121-Apr-06 2:55 
AnswerRe: I/O to a file Pin
Aqueel21-Apr-06 4:49
Aqueel21-Apr-06 4:49 
QuestionChange CView to CScrollView Pin
pathakr21-Apr-06 2:23
pathakr21-Apr-06 2:23 
AnswerRe: Change CView to CScrollView Pin
David Crow21-Apr-06 2:26
David Crow21-Apr-06 2:26 
AnswerRe: Change CView to CScrollView Pin
includeh1021-Apr-06 3:24
includeh1021-Apr-06 3:24 
Questionmove graphic line Pin
yang__lee21-Apr-06 2:16
yang__lee21-Apr-06 2:16 
AnswerRe: move graphic line Pin
Cedric Moonen21-Apr-06 2:22
Cedric Moonen21-Apr-06 2:22 

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.