PDA

Click to See Complete Forum and Search --> : [RESOLVED] Time control


engineer
May 16th, 2006, 05:54 PM
Dear All,

On my form i need to take the user input as time.
Is there any time control that I can use?

Please help and guide.

Thanks

jmcilhinney
May 16th, 2006, 06:40 PM
You use a DateTimePicker and set the Format property to Time. You would normally set the ShowUpDown property to True as well. Note that the Value property of the DateTimePicker control is a DateTime object and contains a date portion and a time portion regardless of the displayed format. If you want to get just the time portion you get the Value.TimeOfDay property, which returns a TimeSpan object.

engineer
May 16th, 2006, 10:15 PM
Thank you sir.