把当前时间修改成指定时间 //把当前时间修改成指定时间 public String dateUtil(Integer seconds, String dateFormatPattern){ Date date = new Date(); Long millis = date.getTime() + seconds * 1000; //时间毫秒值 SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dateFormatPattern);
from_unixtime(unix_timestamp, format) 把时间戳转化为指定的格式 as: select from_unixtime(addTime, '%Y-%m-%d %h:%i:%s') as datetime from table1 unix_timestamp([datetime]) 把日期时间转化为时间戳 as: select from_unixtime([addDay]) as unixtime from table1 case(value as type) co