1 FROM_UNIXTIME(examlist_kaoshiriqi,'%Y-%m-%d')//时间戳格式成字符串
2 unix_timestamp() //当前的时间戳
3 string now() ; //返回当前时间 ,字符串 年-月-日 时-分-秒
4 string curtime(); //返回当前时间 时-分-秒
5 string curdate() // 返回当前日前 年-月-日
6 select sysdate() 和 select current_timestamp
current_timestamp :时间戳 字符串 年-月-日 时-分-秒
7
CREATE TABLE `check_log` (
`id` int(10) unsigned NOT NULL auto_increment,
`ip` varchar(16) NOT NULL default '0.0.0.0',
`check_name` varchar(32) NOT NULL,
`result` tinyint(4) default '0'
`date` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk AUTO_INCREMENT=5 ;
SELECT UNIX_TIMESTAMP( `date` ) AS DATE
FROM check_log
LIMIT 0 , 30;