public static String getDateTime(Date time,String format){
if(time!=null && format!=null){
SimpleDateFormat dateFormat = new SimpleDateFormat(format);
String strTime=dateFormat.format(time);
return strTime;
}else{
return null;
}
}
java Date类型时间转字符串格式时间
猜你喜欢
转载自blog.csdn.net/gaofenglxx/article/details/60139885
今日推荐
周排行