CDatetimepicker ctl formatting
-
Hi, I have written a reminders program which allows the user to input something they need reminding about with a date time picker so they can select the date and the time in which the popup should come up.... I need to input into a string the current system time with the same formatting as the control so that the time and dates will match with the times and dates selected by the user. How do I get the System Time in the same format as the CDateTimePicker control? Code examples would be appreciated or reference to an article. Thankyou, Ashley
-
Hi, I have written a reminders program which allows the user to input something they need reminding about with a date time picker so they can select the date and the time in which the popup should come up.... I need to input into a string the current system time with the same formatting as the control so that the time and dates will match with the times and dates selected by the user. How do I get the System Time in the same format as the CDateTimePicker control? Code examples would be appreciated or reference to an article. Thankyou, Ashley
Have a look at COleDateTime::Format[^] Michael But you know when the truth is told, That you can get what you want or you can just get old, Your're going to kick off before you even get halfway through. When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
-
Hi, I have written a reminders program which allows the user to input something they need reminding about with a date time picker so they can select the date and the time in which the popup should come up.... I need to input into a string the current system time with the same formatting as the control so that the time and dates will match with the times and dates selected by the user. How do I get the System Time in the same format as the CDateTimePicker control? Code examples would be appreciated or reference to an article. Thankyou, Ashley
CDTPicker m_DateStart; // in header VARIANT tmpValue; int year; tmpValue = m_DateStart.GetYaer(); year = tmpValue.iVal; ------ SYSTEMTIME sysTime; ::SendMessage(m_DateStart.GetSafeHwnd(), MCM_GETCURSEL, 0, (LPARAM)&sysTime); year = sysTime.wYear; ------ ***************************************** http://www.thecodeproject.com/statusbar/activexstatbar.asp http://www.codeguru.com/Cpp/controls/controls/dateselectioncontrolsetc/article.php/c2229/