Parse String date in (yyyy-MM-dd) format

后端 未结 5 806
小蘑菇
小蘑菇 2020-11-30 14:51

I have a string in the form \"2013-09-18\". I want to convert it into a java.util.Date. I am doing this

SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM         


        
5条回答
  •  一个人的身影
    2020-11-30 15:32

    DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
    String cunvertCurrentDate="06/09/2015";
    Date date = new Date();
    date = df.parse(cunvertCurrentDate);
    

提交回复
热议问题