JAVA: String类转Date

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_38703170/article/details/82592156
/**
 * 将strStartDate(string类)转换成startDate(date类)
 */
String strStartDate;
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
Date startDate = df.parse(strStartDate);

猜你喜欢

转载自blog.csdn.net/weixin_38703170/article/details/82592156