Results 1 to 2 of 2

Thread: [2005] Validating Date

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    258

    [2005] Validating Date

    I have a datetimepicker in my Applicant Profile.. now we need a validation that when we save.. a msgbox will pop out saying the Applicant is not yet of the proper age.. saying that here.. the applicant must be 18 years old to work.. thanks

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

    Re: [2005] Validating Date

    vb.net Code:
    1. If myDataTimePicker.Value > Date.Today.AddYears(-18) Then
    2.     'Date is less than 18 years ago.
    3. End If

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