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

C / C++ / MFC

 
AnswerRe: Keyboard focus to ActiveX control Pin
Andrew Hoole9-Jun-06 0:48
Andrew Hoole9-Jun-06 0:48 
AnswerRe: Keyboard focus to ActiveX control Pin
Andrew Hoole9-Jun-06 0:43
Andrew Hoole9-Jun-06 0:43 
Questiondate fetch problem Pin
yogendra kaushik8-Jun-06 22:59
yogendra kaushik8-Jun-06 22:59 
AnswerRe: date fetch problem Pin
Cedric Moonen8-Jun-06 23:02
Cedric Moonen8-Jun-06 23:02 
GeneralRe: date fetch problem Pin
yogendra kaushik8-Jun-06 23:14
yogendra kaushik8-Jun-06 23:14 
AnswerRe: date fetch problem Pin
_AnsHUMAN_ 8-Jun-06 23:05
_AnsHUMAN_ 8-Jun-06 23:05 
AnswerRe: date fetch problem Pin
yogendra kaushik8-Jun-06 23:24
yogendra kaushik8-Jun-06 23:24 
AnswerRe: date fetch problem Pin
Laxman Auti9-Jun-06 0:04
Laxman Auti9-Jun-06 0:04 
yogendra kaushik wrote:
i want to fetch date from mysql table into mfc dialog box date time picker control
wat problem is that date stored in mysql in format yyyy-mm-dd
and mfc store in the format dd-mm-yyyy
so it does not fetch the date only
can u tel me the code how to fetch date from mysql format yyyy-mm-dd
into mfc format dd-mm-yyyy


Here is the code ... which converts the date extracted from the mysql and put it into DTPicker control.
CString strTestDate("2006-05-05");
SYSTEMTIME currTime;
GetSystemTime(&currTime);
sscanf(strTestDate.GetBuffer(0),"%u-%u-%u",&currTime.wYear,&currTime.wMonth,&currTime.wDay); 
strTestDate.ReleaseBuffer();
m_DateTime=CTime(currTime);;
UpdateData(0);
Where strTestDate is fetched date from mysql. and m_DateTime is the control variable of the DTPicker control of type CTime.

here GetSystemTime is required to get the correct format result of the date picked from the mysql table.

Hope you are looking for same.


Knock out 't' from can't,
You can if you think you can
Cool | :cool:
Questionneed help in subclass a non MFC control Pin
Haitham Khedre8-Jun-06 22:35
Haitham Khedre8-Jun-06 22:35 
QuestionHow can I append LPTSTR to CStirng Pin
NoName II8-Jun-06 22:22
NoName II8-Jun-06 22:22 
AnswerRe: How can I append LPTSTR to CStirng [modified] Pin
Christian Graus8-Jun-06 22:24
protectorChristian Graus8-Jun-06 22:24 
AnswerRe: How can I append LPTSTR to CStirng Pin
Laxman Auti8-Jun-06 22:45
Laxman Auti8-Jun-06 22:45 
AnswerRe: How can I append LPTSTR to CStirng Pin
Hamid_RT9-Jun-06 0:48
Hamid_RT9-Jun-06 0:48 
AnswerRe: How can I append LPTSTR to CStirng Pin
toxcct9-Jun-06 1:39
toxcct9-Jun-06 1:39 
AnswerRe: How can I append LPTSTR to CStirng Pin
ThatsAlok11-Jun-06 22:18
ThatsAlok11-Jun-06 22:18 
QuestionStreaming Video in MFC or any language [modified] Pin
UCFSeniorBen8-Jun-06 21:26
UCFSeniorBen8-Jun-06 21:26 
AnswerRe: Streaming Video in MFC or any language [modified] Pin
Sarath C8-Jun-06 22:37
Sarath C8-Jun-06 22:37 
QuestionFiledialog and DLL Pin
Nicolai M8-Jun-06 20:52
Nicolai M8-Jun-06 20:52 
AnswerRe: Filedialog and DLL Pin
Cedric Moonen8-Jun-06 20:57
Cedric Moonen8-Jun-06 20:57 
GeneralRe: Filedialog and DLL Pin
Nicolai M8-Jun-06 22:56
Nicolai M8-Jun-06 22:56 
GeneralRe: Filedialog and DLL Pin
Viorel.9-Jun-06 0:03
Viorel.9-Jun-06 0:03 
GeneralRe: Filedialog and DLL Pin
Nicolai M9-Jun-06 2:02
Nicolai M9-Jun-06 2:02 
AnswerRe: Filedialog and DLL Pin
Hamid_RT8-Jun-06 21:06
Hamid_RT8-Jun-06 21:06 
AnswerRe: Filedialog and DLL Pin
Viorel.8-Jun-06 21:17
Viorel.8-Jun-06 21:17 
AnswerRe: Filedialog and DLL Pin
Sarath C8-Jun-06 22:01
Sarath C8-Jun-06 22:01 

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.