Here you can find the source of parseDateTime(String dateTimeString)
public static final java.util.Date parseDateTime(String dateTimeString) throws java.text.ParseException
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; public class Main { public static final java.util.Date parseDateTime(String dateTimeString) throws java.text.ParseException { DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT); if (df instanceof SimpleDateFormat) { SimpleDateFormat sdf = (SimpleDateFormat) df; sdf.applyPattern(sdf.toPattern() + " HH:mm:ss"); df = sdf;//from w w w . j a v a 2s.co m } return df.parse(dateTimeString); } }