Home > Database > Mysql Tutorial > MySql日期查询语句详解_MySQL

MySql日期查询语句详解_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:25:46
Original
1133 people have browsed it

bitsCN.com 使用DATE_FORMAT方法
SELECT * FROM `ler_items` WHERE DATE_FORMAT(postTime,'%Y-%m')='2013-03'
注意:日期一定要用'',否则没有效果
其它的一些关于mysql日期查找语句
mysql> select date_format(DATE_SUB(CURDATE(), INTERVAL 7 DAY),'%y%m%d');
+―――――――――――――――――――

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