Here's a simple tip for the day. If you've ever wanted to make it easy for a user to select a date and time in a UI, you've probably realized that you need two DateTimePicker controls. The way the controls are rendered, you can edit both the date and the time in one control, but it's a little neater with the separation. There is a trick or two though, and it would actually be a good candidate for combining into a single UserControl.
First of all, each control needs its Format set. Keep in mind that each control contains a DateTime instance internally. The Format lets you specify how the DateTime is displayed. The control is then smart enough to understand how to manage the editing of the various parts, based on that format.
The Format property defaults to "Long" which looks like this: "Tuesday, October 3, 2006". You can also choose Short ("10/3/2006") or Time ("10:35:11 AM"). For more control , specify Custom, then you can use the CustomFormat property to specify any valid date/time formatting string. In this case, you may want to specify Short for the date entry control, and Time for the time entry control.
There isn't much left to do. Now the user as a control to enter the date, and a control to enter the time. The next step is to combine those back into a single field. Each DateTimePicker control has a Value property. This is the underlying DateTime object set based on user input. It defaults to DateTime.Now when created.
Logically, you may think that you want to start with the date, then set the TimeOfDay property to the value of the other object's TimeOfDay. This doesn't actually work though since TimeOfDay is read-only. It's worth examining what the TimeOfDay property actually exposes. First of all, it returns a TimeSpan object. What's that? It's represents elapsed time. It has properties for milliseconds, seconds, minutes, hours, etc., but it isn't an actual date or time. On the other hand, if you know it's reference point, you can turn it into an absolute date or time. In this case, the reference point is midnight. 1:30 in the morning is represented as a TimeSpan of one hour, thirty minutes. If we have a date set at minute, we can combine the two by simply adding them.
So, starting with the value from the from the date picker, we want the Date property. This is a DateTime object with the time stripped off to midnight. Then from the time picker, we want the TimeOfDay property. This is the elapsed time since midnight, with no date component. Simply add them together, and you're good to go!
DateTime selectedDate = dateDatePicker.Value.Date;
TimeSpan selectedTime = timeDatePicker.Value.TimeOfDay;
DateTime combinedDateTime = selectedDate.Add(selectedTime);
The combinedDateTime object now holds the final time/date stamp as intended. Sure, you can get the same final result with a single DateTimePicker and the right format, but this gives a little more flexibility to the UI. Do what works for your application!