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 offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,810
    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 JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on 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, 02: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, 02:28 PM
  3. SDF validating date input
    By getshum in forum New To Java
    Replies: 2
    Last Post: 02-03-2011, 09:37 AM
  4. Calendar object? - Getting date from user
    By hiei_yasha in forum New To Java
    Replies: 9
    Last Post: 01-23-2011, 04:58 AM
  5. Compare date input to database with current date
    By hungleon88 in forum Advanced Java
    Replies: 2
    Last Post: 11-25-2008, 09: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
  •