A difficult question for me to resolve about C++ and Access datetime type
-
http://www.codeguru.com/forum/showthread.php?t=387391[^] The question is above the link:) Jeff Fan No change is the worst!!! The principal of mine msn:fyr000000@hotmail.com If you like coding , add me.
-
http://www.codeguru.com/forum/showthread.php?t=387391[^] The question is above the link:) Jeff Fan No change is the worst!!! The principal of mine msn:fyr000000@hotmail.com If you like coding , add me.
Your question is not very clear, but if you want to get the current time, you can use:
CTime Time = CTime::GetCurrentTime();
Cédric Moonen Software developer
Charting control -
http://www.codeguru.com/forum/showthread.php?t=387391[^] The question is above the link:) Jeff Fan No change is the worst!!! The principal of mine msn:fyr000000@hotmail.com If you like coding , add me.
if you need to current time see
CString str; SYSTEMTIME st; GetLocalTime(&st); str.Format("%d:%d:%d:",st.wHour,st.wMinute,st.wSecond);
_**
**_
whitesky
-
http://www.codeguru.com/forum/showthread.php?t=387391[^] The question is above the link:) Jeff Fan No change is the worst!!! The principal of mine msn:fyr000000@hotmail.com If you like coding , add me.
How can I insert the System time(current time) into access like the former in C++ (eg. 2006-04-19 16:41) ??? The time in access is datetime type!!! I know in Java , it can use the method getdate(). But I have scanned many meterials , that I can't find in C++ retcode=SQLExecDirect(hstmt,(UCHAR*)"insert into package(Protocol,SrcAddr,DstAddr,SrcPort,DstPort,TotalLen,GetTime)values('a','b','c','d','e',2000000,'3-2-2006')",SQL_NTS);//SQLÓï¾äÖ´Ðгö´í the quote '3-2-2006' of the sentence , can i substitue with the system time??? Jeff Fan No change is the worst!!! The principal of mine msn:fyr000000@hotmail.com If you like coding , add me.
-
http://www.codeguru.com/forum/showthread.php?t=387391[^] The question is above the link:) Jeff Fan No change is the worst!!! The principal of mine msn:fyr000000@hotmail.com If you like coding , add me.
fyr000000 wrote:
Isn't CodeGuru help you?, any way you can try COLEDateTime.
COleDateTime curTime= COleDateTime::GetCurrentTime( );
CString str = curTime.Format(_T(" %Y-%m-%d %I:%M"));"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
http://www.codeguru.com/forum/showthread.php?t=387391[^] The question is above the link:) Jeff Fan No change is the worst!!! The principal of mine msn:fyr000000@hotmail.com If you like coding , add me.
Ovidiu answered your question very plainly. What's the problem?
"The largest fire starts but with the smallest spark." - David Crow
-
How can I insert the System time(current time) into access like the former in C++ (eg. 2006-04-19 16:41) ??? The time in access is datetime type!!! I know in Java , it can use the method getdate(). But I have scanned many meterials , that I can't find in C++ retcode=SQLExecDirect(hstmt,(UCHAR*)"insert into package(Protocol,SrcAddr,DstAddr,SrcPort,DstPort,TotalLen,GetTime)values('a','b','c','d','e',2000000,'3-2-2006')",SQL_NTS);//SQLÓï¾äÖ´Ðгö´í the quote '3-2-2006' of the sentence , can i substitue with the system time??? Jeff Fan No change is the worst!!! The principal of mine msn:fyr000000@hotmail.com If you like coding , add me.
I am sorry that I have asked by mistake ! I go to the link again!!! Thank you all very much. Jeff Fan No change is the worst!!! The principal of mine msn:fyr000000@hotmail.com If you like coding , add me.