获取指定格式的系统时间

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

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

猜你喜欢

转载自www.cnblogs.com/yuan-zhou/p/11993415.html