Home > Database > Mysql Tutorial > body text

mysql获得60天前unix时间_MySQL

WBOY
Release: 2016-06-01 13:13:23
Original
1049 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!