Home > Database > Mysql Tutorial > 截取日期参数中的月和日

截取日期参数中的月和日

WBOY
Release: 2016-06-07 14:53:40
Original
1646 people have browsed it

截取日期参数中的月和日 select * from table where substring(CONVERT(varchar(12),colum,112),5,4) between 0101 and 0505 查询1月1日到5月5日之间 www.2cto.com 如果是截取单个,如月份 select colum (mm,fdBirthDay) from table


截取日期参数中的月和日

 

select * from table where 

 

substring(CONVERT(varchar(12),colum,112),5,4) between '0101' and '0505' 

 

查询1月1日到5月5日之间 

  www.2cto.com  

如果是截取单个,如月份 

 

select colum (mm,fdBirthDay) from table

 

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