Databases - Calendars and Dates

Calendars and Dates - how trivial ... all applications seem to use these. Too bad they're so difficult to figure out.

It appears that Microsoft XP provides 2 controls via its Common Controls Library - C:\WIN98\SYSTEM\MSComCt2.OCX - DateTimePicker and MonthCalendar.

That file missing in Windows Vista.

MS Access 2007 97 | Delphi

MS Access 2007

Starting with MS Access 2007, the date/calendar functionality is built in and there is no longer a need for a separate ActiveX component. When the user clicks inside the text box, a calendar icon will be displayed to the right of the text field. When the icon is clicked, the calendar will be displayed.

MS Access 97

There are 3 calendar controls. They can be added to a form via either of 2 methods The following lists the controls (and their libraries) to select from the list.

Though the default parameters are obviously different, the Microsoft MonthView and DTPicker controls appear to be identical to the Delphi TMonthCalendar and TDateTimePicker respectively.

Of course, nothing is quite as simple as this, I suggest that you read my MS Access - Calendar Example before trying to do this on your own.

Delphi 5.0

On the Win32 tab, Delphi 5 provides Apparently, these functions are implemented via the Windows Common Controls library. In addition, a few calendar type functions are implemented via Kernel 32.

In order for the user to set both the date and time requires 2 DateTimePicker's. On one of them, set the kind property to dtkTime (the default is dtkDate).

Author: Robert Clemenzi -
URL: http:// / user / clemenzi / technical / Databases / Calendars_n_Dates.html