FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 525 Ask New Question


On By


1 Answer


You can use java.text.SimpleDateFormat Class to parse Date Strings in specified formats.
Following is the sample code

Date dateObject = new SimpleDateFormat("yyyy-MM-dd").parse("2017-10-15");

Note: This line will throw the java.text.ParseException if the String does not match with the pattern

On By


Answer This Question


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News