获取指定格式的系统时间

输入格式即可得到指定格式的系统时间,一般页面展示使用分隔符隔开,存入库一般直接一串14位数字

public String getSystemDate(String format){
    SimpleDateFormat sdf = new SimpleDateFormat(format);
    return sdf == null ? null : sdf.format(new Date());
}

 

posted @ 2019-12-06 09:42  我永远喜欢石原里美  阅读(306)  评论(0编辑  收藏  举报