question: public static Date stringToDate ( String dateAsString ) { try { DateFormat df = new SimpleDateFormat ( dateFormat ) ; df . setTimeZone ( utc ) ; return df . parse ( dateAsString ) ; } catch ( ParseException e ) { return null ; } catch ( NullPointerException e ) { return null ; } }
target:  Converts a string representation of a date to its respective Date object.