

The formats available are Long Date (0), Short Date (1), Time (2), and Custom (3). With the DateTimePicker control you are able to specify a valid range of datetimes as well as the format of the datetime value displayed in the control. You can access the current date/time value from the Object.Value property on the control or from the properties that correspond to the various parts of a datetime value (Year, Month, Day, Hour, Minute, Second, and so forth). A number of the controls are set up as read-only because the property they represent from the DateTimePicker control is write-only. This sample provides a form containing the DateTimePicker control along with additional controls that allow you to manipulate the various properties on the control and see the results. When you distribute your application, install the Mscomct2.ocx file in the user's Microsoft Windows System or System32 directory. To use the DateTimePicker control in your application, you must add the Mscomct2.ocx file to the project. NOTE: The DateTimePicker control is part of a group of ActiveX controls that are found in the Mscomct2.ocx file.

The drop-down calendar has two buttons that enable you to scroll the months in and out of view. You can navigate to the control by using either the keyboard or the mouse. Time Format mode – enables the user to select a field in the date display (such as, the month, day, year, and so forth), and press the UP or DOWN arrow to the right of the control to set its value. The DateTimePicker control operates in two modes:ĭrop-down Calendar mode (default) – enables the user to display a drop-down calendar that can be used to select a date.

In addition, users can select a date from a drop-down calendar interface similar to the MonthView control. The DateTimePicker control enables you to provide a formatted datetime field that allows easy date or time selection. The DTPicker.exe file contains the following files: The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Microsoft used the most current virus-detection software that was available on the date that the file was posted. Release Date: Apr-26-2000įor additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:ġ19591 How to Obtain Microsoft Support Files from Online Services The following file is available for download from the Microsoft Download Center:ĭownload the DTPicker.exe package now. How to use the DateTimePicker control in Visual FoxPro SummaryĭTPicker.exe is a sample that shows how to use the ActiveX DateTimePicker control.
