Results 1 to 3 of 3

Thread: Question for DateTimePicker

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2008
    Location
    Philippines
    Posts
    70

    Question for DateTimePicker

    How can I add aditional hours for the value of DateTimePicker. What I want to do is to add 9 hours for the initial value of the date time picker. Thanks

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

    Re: Question for DateTimePicker

    vb.net Code:
    1. myDateTimePicker.Value = myDateTimePicker.Value.AddHours(9)
    Note that the Value property is a Date object, so you can do anything to or with it that you can do to or with any other Date 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
    Lively Member
    Join Date
    Jun 2008
    Location
    Philippines
    Posts
    70

    Re: Question for DateTimePicker

    Thanks

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