Home > Database > Mysql Tutorial > mysql获得60天前unix时间思路及代码_MySQL

mysql获得60天前unix时间思路及代码_MySQL

WBOY
Release: 2016-06-01 13:06:05
Original
1099 people have browsed it

select UNIX_TIMESTAMP(ADDDATE(NOW(),INTERVAL -60 DAY)) 
Copy after login

首先根据now()获得当前时间

使用adddate()方法获得60天前时间

使用unix_timestamp()方法转换时间类型

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template