Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SimpleDateFormat df = new SimpleDateFormat("MM/dd/yyyy");
DateFormat df2 = DateFormat.getDateInstance(DateFormat.FULL);
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String input;
System.out.print("Enter date as MM/dd/yyyy:");
input = reader.readLine();
try {
Date d = df.parse(input);
System.out.println("The date you entered is:" + df2.format(d));
} catch (Exception e) {
System.err.println("The value you entered is not a date!");
}