Results 1 to 3 of 3

Thread: [RESOLVED] Time control

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    237

    Resolved [RESOLVED] Time control

    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
    software engineer

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Time control

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    237

    Thumbs up Re: Time control

    Thank you sir.
    software engineer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width