字符串日期转为时间

来源:互联网 发布:SQL中describe 编辑:程序博客网 时间:2024/05/22 03:34
/**
* 字符串日期转为时间
*/
private Date StringDateToDate(String dateStr)
{
SimpleDateFormat formatDate = new SimpleDateFormat("yyyy-MM-dd hh:mm");
Date date = null;
try
{
date = formatDate.parse(dateStr);
} catch (ParseException e)
{
e.printStackTrace();
}
return date;
}
0 0