去发现生活中的美好,记录生活中的点点滴滴

MySQL时间

mysql admin 1271℃
提前一小时(相对当前时间,即一小时前);
select DATE_ADD(Now(),INTERVAL -1 hour);
select DATE_ADD(CURRENT_TIME(),INTERVAL -1 hour);

select date_sub(now(), interval 1 hour);

明天

select date_add(curdate(), interval 1 day);
当天
select curdate();
当前时间
select unix_timestamp(now()) ;
select NOW()
查询当天所有数据
date(begin_time) = curdate()
返回天数:
select TO_DAYS(DATE_ADD(NOW(),INTERVAL -1 hour))
 
Linux下查看mysql路径
指令 ps -ef|grep mysql 得出结果

转载请注明:永盟博客 » MySQL时间

喜欢 (0)

Warning: count(): Parameter must be an array or an object that implements Countable in E:\www\blog\wp-includes\class-wp-comment-query.php on line 405