Here you can find the source of toDateString(String ddMMMyyyy)
public static String toDateString(String ddMMMyyyy)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static String toDateString(String ddMMMyyyy) { String dateString = ""; try {/*from w ww . j a v a 2 s . co m*/ Date date = new SimpleDateFormat("ddMMMyyyy", Locale.US).parse(ddMMMyyyy); dateString = new SimpleDateFormat("yyyy-MM-dd", Locale.US).format(date); } catch (Exception e) { e.printStackTrace(); return ""; } return dateString; } }