修改时间返回格式

This commit is contained in:
zhanghongqing
2018-12-12 17:17:41 +08:00
parent de76b6a75a
commit 76008c23f9

View File

@@ -272,7 +272,7 @@ public class DashboardService extends BaseService {
* @return
*/
public static String stampToDate(long timeStamp){
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//这个是你要转成后的时间的格式
SimpleDateFormat sdf=new SimpleDateFormat("MM-dd HH:mm");//这个是你要转成后的时间的格式
String sd = sdf.format(new Date(timeStamp)); // 时间戳转换成时间
return sd;
}