Link to home
Start Free TrialLog in
Avatar of newbieal
newbiealFlag for United States of America

asked on

java: processing date variable

I want to create a method that takes in a date variable from the user.  Can someone show me how to do this in Java and then format it so that the final date saved is 10/16/2008.  thanks.
Avatar of newbieal
newbieal
Flag of United States of America image

ASKER

I want something like this, however the date is supplied by the user:
SimpleDateFormat df = new SimpleDateFormat("MM/dd/yyyy");
System.out.println("Today is " + df.format(new Date()) );

Open in new window

SOLUTION
Avatar of sciuriware
sciuriware

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I already have a method in place that passes a string variable that holds the date, but I just don't understand how to use that variable to process it using the code snippet above.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial