我正在獲取這種格式的字符串,如下所示03-12-2018我想根據 Java 8 標準將其轉換為以下格式,請告知December 03 , 2018 我嘗試過的如下所示,但我沒有成功,請告知如何實現相同的目標SimpleDateFormat month_date = new SimpleDateFormat("MMM yyyy", Locale.ENGLISH); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String actualDate = "03-12-2018"; Date date = sdf.parse(actualDate); String month_name = month_date.format(date); System.out.println("Month :" + month_name);
添加回答
舉報
0/150
提交
取消