Home >Database >Mysql Tutorial >mysql 日期相加减sql查询语句

mysql 日期相加减sql查询语句

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:49:491236browse

工作需要需要查询本月,本月来的数据进行排行,仔细一看数据库在数据库里保存的日期格式是2010-02-23 14:2:3这种类型的,这样我以为的按秒存在数据库的查询方法就不行了,在网上找到一款日期相加减sql函数 datediff(now,oldtime)。测试了一下完全可以用下面我

Statement:
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