J2SE-通过SimpleDateFormat使String转换为Date

版权声明:【北京Java青年】:456588754 https://blog.csdn.net/Amen_Wu/article/details/53457533
//MM大写月份,mm分钟
String borDate="2016-01-01";
SimpleDateFormat sdf=new SimpleDateFormat(“yyyy-MM-dd”);
Date date=sdf.parse(borDate);

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Amen_Wu/article/details/53457533
今日推荐