java字符串类型时间转Date类型时间

public static Date getFormatDate(String time,String format) {
		try {
			SimpleDateFormat sdf = new SimpleDateFormat(format);
			return sdf.parse(time);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		return null;
	}

发布了87 篇原创文章 · 获赞 22 · 访问量 19万+

猜你喜欢

转载自blog.csdn.net/gaofenglxx/article/details/60139839
今日推荐