标签:
时间类型:
System.currentTimeMillis() 获得的是自1970-1-01 00:00:00.000 到当前时刻的时间距离,类型为long
import java.sql.Date date = new Date(System.currentTimeMillis()); 2015-11-06
import java.sql.Time time = new Time(System.currentTimeMillis()); 09:51:09
import java.sql.Timestamp hh = new Timestamp(System.currentTimeMillis()); 2015-11-06 09:51:09.407
import java.util.Date date = new Date(); Fri Nov 06 09:57:25 CST 2015 SimpleDateFormat s = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); 2015/11/06 09:57:25
标签:
原文地址:http://www.cnblogs.com/tianmengwei/p/4980891.html