Results 1 to 4 of 4

Thread: Date Time Picker

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2005
    Posts
    40

    Date Time Picker

    Hello All,
    I have a date Time Picker but the only issue I am having is that I am trying to validate that the user can not enter in a min time of 7:00 AM and no later than 8:00PM. This is what I have:


    If Me.dtpTime.MinDate<=7AM Then
    MessageBox.Show("Can Not Book Appointment Before 7 AM")

    End If


    Thanks in Advance for any help

  2. #2

  3. #3
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Date Time Picker

    try this:
    VB Code:
    1. If (DTPicker1.Hour < 7) Or (DTPicker1.Hour > 20) Then
    2.         MsgBox "Please book AppointMents between 7 AM and 8 PM"
    3. End If
    4.    
    5. 'dont forget to check the seconds value also
    Harsh
    Show Appreciation. Rate Posts.

  4. #4
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: Date Time Picker

    change the color of the code ,i can hardly see anything !!
    __________________
    ________________0îîî___
    ___îîî0________(___)____
    __(___)_________) _/_____
    ___\_ (_________(_/______
    ____\_)_________________

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