String into a Date object?
One of hundreds of answers available with our premium content service.
A: The recommended way to parse a String representation of a date to a Date object is to use the java.text.SimpleDateFormat class parse(String) method. In its simplest form, the class is instantiated with a String pattern argument that defines the general syntax of the date to be parsed. In the example below, the World Wide Web Consortium (W3C) date time format for year, month and day is represented by the pattern yyyy-MM-dd and is used to parse the date string 2008-09-20.
… full answer hidden
Premium members click below for full answer
How can I convert a String into a Date object?