How to convert user input to Date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Akinyemi
    New Member
    • Sep 2006
    • 32

    How to convert user input to Date

    Hi,
    I started learning Java a year ago. Before then I had written a Visual Basic Program that maintains student information.
    I now want to write the same program in Java. But I do not know how to convert user input to Date. For example the user will have to type in the student's birthDate, yearOfGraduatio n, etc?
    I have read some tutorials but couldn't figure out anything as there were no relevant examples.
    Suppose a user types 2/9/ 2006, how do my program display the date as 02/09/2006? The two stands for day, the 9 stands for month.
    Thank you for helping me.
    Akinyemi
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    2/9/2006 is 2nd September of 2006 or 9th February 2006?

    Please read SimpleDateForma te

    I am unable to comment more on this, since you have not poster the code you have written for your problem.

    Regards
    Dheeraj Joshi

    Comment

    Working...