Question about use Date Time Picker Control??thank you 
Author Message
 Question about use Date Time Picker Control??thank you

How can i get the date in the Date Time Picker and compare it with current
date, thank you
I know how to get the current date of my pc, but how can i get the value in
the Date Time Picker and compare it with the current date;

My code:
COleDateTime m_Date;

void CMyDlg::Button1()
{
COleDateTime m_CurrentTime = COleDateTime::GetCurrentTime();

/*
if( The Value of m_Date > Current Date)
    AfxMessageBox("This date is future date");
*/

Quote:
}



Wed, 05 May 2004 13:35:53 GMT  
 Question about use Date Time Picker Control??thank you
Solved the problem la, thank you!!


Wed, 05 May 2004 13:42:15 GMT  
 Question about use Date Time Picker Control??thank you
Hello,

You may use Class Wizard to add a control member as CDateTimeCtrl for
example m_datetime. in the Button1(), use the following code to get the
control's date and time.

CTime datetime;
m_datetime.GetTime(datetime);

Hope this helps. If you have any questions, please reply to this post.

Best Regards,
Max Lu
Microsoft Support
==========================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

Quote:

>>Subject: Question about use Date Time Picker Control??thank you
>>Date: Sat, 17 Nov 2001 13:35:53 +0800
>>Lines: 20
>>X-Priority: 3
>>X-MSMail-Priority: Normal
>>X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
>>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

>>Newsgroups: microsoft.public.vc.mfc
>>NNTP-Posting-Host: vp174190.ntw.uac1.hknet.com 203.169.174.190
>>Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp07
>>Xref: cppssbbsa01.microsoft.com microsoft.public.vc.mfc:303322
>>X-Tomcat-NG: microsoft.public.vc.mfc

>>How can i get the date in the Date Time Picker and compare it with current
>>date, thank you
>>I know how to get the current date of my pc, but how can i get the value
in
>>the Date Time Picker and compare it with the current date;

>>My code:
>>COleDateTime m_Date;

>>void CMyDlg::Button1()
>>{
>>COleDateTime m_CurrentTime = COleDateTime::GetCurrentTime();

>>/*
>>if( The Value of m_Date > Current Date)
>>    AfxMessageBox("This date is future date");
>>*/

>>}



Sat, 08 May 2004 20:22:09 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Question about use Date Time Picker Control??thank you

2. Using the Microsoft Date and Time Picker Control in MFC

3. Date and Time Picker Control question

4. Date Time Picker - Date AND Time

5. Using a Date Time Picker

6. Using Date And Time Picker and Month Calendar together

7. Date and Time Picker Control - changing display window

8. Date Time Picker control crashes if edit year!

9. Getting at the spin control in a date/time picker

10. Date and Time Picker Control

11. DDX function for Date Time Picker Control

12. Date/time control picker

 

 
Powered by phpBB® Forum Software