英文类型的日期 转换日期格式
例如:01-Jun-2022 转换成 2022-06-01 00:00:00格式
private static String engDateToString(String engDate)throws Exception{SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy", Locale.ENGLISH);Date date = dateFormat.parse(engDate);DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");String dateStr = sdf.format(date);System.out.println(dateStr);return dateStr;}
测试:
public static void main(String[] args) throws Exception{System.out.println(engDateToString("01-Jun-2022"));}

