数据库dateTime类型java赋值格式化
SimpleDateFormat formatter= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");String format = formatter.format(new Date());formatter.parse(format)
·
SimpleDateFormat formatter= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format = formatter.format(new Date());
formatter.parse(format)
第二种方式 Timestamp timestamp = new Timestamp(System.currentTimeMillis());
更多推荐



所有评论(0)