Which control to use for time?

You use the DateTimePicker for dates and/or times. If you want only time then you can set the Format to Time or the Format to Custom and the CustomFormat to a format string that will display only time, e.g. "HH:mm". Normally, if you're not displaying the date then you would set ShowUpDown to True, so you get spinner buttons instead of the calendar drop down. The Value property of the DTP is a DateTime, which contains both date and time. If you want just the time then you can get its TimeOfDay property, which is a TimeSpan.
 
After reading JohnH's reply I went back and re-read the first post and it seems that I may have misinterpreted the question. Of course, if questions are asked clearly, rather than in as few keystrokes as possible, there is much less chance of misinterpretation.
 
Back
Top