Home > Database > Mysql Tutorial > mysql日期比较语句_MySQL

mysql日期比较语句_MySQL

WBOY
Release: 2016-06-01 13:40:28
Original
1166 people have browsed it

bitsCN.com
mysql日期比较语句 select * from student where '2012-02-27 00:00:00' created_date select * from student where UNIX_TIMESTAMP('2012-02-27 00:00:00') UNIX_TIMESTAMP(created_date);   SELECT * FROM student WHERE (UNIX_TIMESTAMP(created_date) - UNIX_TIMESTAMP('2012-02-26 00:00:00') ) >= 0 AND (UNIX_TIMESTAMP(created_date) - UNIX_TIMESTAMP('2012-02-29 00:00:00') )
有了这个函数,就可以很自然地把时间比较转换为一个无符号整数的比较。例如,判断一个时间是否在一个区间内unix_timestamp( time ) between unix_timestamp( 'start ') and unix_timestamp( 'end' ) bitsCN.com

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