Results 1 to 4 of 4
  1. #1
    beginnerprog is offline Member
    Join Date
    Mar 2013
    Posts
    22
    Rep Power
    0

    Default Getting user to input date

    Does anyone know how I can get user to input date and somehow tell if its valid. Can i do this by displaying a calender im soo confused at the moment someone help me please.

  2. #2
    jim829 is online now Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,654
    Rep Power
    5

    Default Re: Getting user to input date

    What have you tried so far? Is this an assignment? If so, what instructions have you been provided by your teacher?

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  3. #3
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    760
    Rep Power
    8

    Default Re: Getting user to input date

    What kind of program are you writing? I can just simply write a console program and use SimpleDateFormat class to parse whether a string of date provided by user is valid.

  4. #4
    MW130 is offline Senior Member
    Join Date
    Jan 2013
    Posts
    317
    Rep Power
    2

    Default Re: Getting user to input date

    You can use the Scanner class. I recommend that for String input.

Similar Threads

  1. Java Date input from User,
    By Shahnawaz in forum New To Java
    Replies: 22
    Last Post: 09-07-2011, 01:20 AM
  2. Taking user input as a date and validation!
    By Junki3JJC in forum New To Java
    Replies: 3
    Last Post: 03-29-2011, 01:28 PM
  3. SDF validating date input
    By getshum in forum New To Java
    Replies: 2
    Last Post: 02-03-2011, 08:37 AM
  4. Calendar object? - Getting date from user
    By hiei_yasha in forum New To Java
    Replies: 9
    Last Post: 01-23-2011, 03:58 AM
  5. Compare date input to database with current date
    By hungleon88 in forum Advanced Java
    Replies: 2
    Last Post: 11-25-2008, 08:10 AM

Posting Permissions

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