Home > Database > Mysql Tutorial > mysql时间比较的语句_MySQL

mysql时间比较的语句_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:40:37
Original
1197 people have browsed it

bitsCN.com
mysql时间比较的语句 假设endTime="2011-01-27 15:52:11", 求出当前时间与结束时间的结果. (以秒为单位.) SELECT TIMESTAMPDIFF(SECOND, now(), '2011-01-27 15:52:11') 语法为:     TIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2),其中unit单位有如下几种,分别是: FRAC_SECOND (microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or YEAR。 计算结果为datetime_expr2-datetime_expr1     bitsCN.com

Related labels:
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template