Home > Database > Mysql Tutorial > MySql计算两个日期的时间差函数_MySQL

MySql计算两个日期的时间差函数_MySQL

WBOY
Release: 2016-06-01 13:48:06
Original
1190 people have browsed it

bitsCN.com
MySql计算两个日期的时间差函数 MySql计算两个日期的时间差函数TIMESTAMPDIFF用法:  语法: Java代码  TIMESTAMPDIFF(interval,datetime_expr1,datetime_expr2)      说明: 返回日期或日期时间表达式datetime_expr1 和datetime_expr2the 之间的整数差。其结果的
单位由interval 参数给出。interval 的法定值同TIMESTAMPADD()函数说明中所列出的相同。  SELECT TIMESTAMPDIFF(MONTH,'2009-10-01','2009-09-01'); interval可是: SECOND 秒 SECONDS MINUTE 分钟 MINUTES HOUR 时间 HOURS DAY 天 DAYS MONTH 月 MONTHS YEAR 年 YEARS bitsCN.com

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