Here you can find the source of getDate(String date)
public static Date getDate(String date) throws ParseException
import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import android.util.Log; public class Main{ public static Date getDate(String date) throws ParseException { DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); Date d = formatter.parse(date); Log.v(DateUtil.class.getName(), d.toString()); return d; }/*from w ww . j a v a2s .c o m*/ }