Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Java Beginner/Date Validation Question

    Hello,

    I am very new to Java, and have a VERY limited knowledge of the language. I am trying to use a date validation function on two fields fromDate and toDate.

    I have found the Date Validation function that i would like to use, and I was told that i need to create an If statement to call the function to check the dates in the two fields. Then if one of the dates are not valid then i need to throw them to our error page telling them that they entered an invalid date. And if the dates are correct i assume that i do nothing.

    Could someone please help me develop this?

    Code:
    if (!Validator.isValid(fromDate) || !Validator.isValid(toDate)) {
    
    //do something
    
    
    
    
    }

    I apologize in advance for my lack of knowledge but i'm trying to learn this and i need some help.

  • #2
    New Coder
    Join Date
    Dec 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Opps....never mind i figured it out.


  •  

    Posting Permissions

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