Home > Database > Mysql Tutorial > sql语句中如何将datetime格式的日期转换为yy-mm-dd格式

sql语句中如何将datetime格式的日期转换为yy-mm-dd格式

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:57:32
Original
1843 people have browsed it

sql语句中如何将datetime格式的日期转换为yy-mm-dd格式

如果在asp中我们可以用year(date())这样的格式
在sql语句中,不知道这样的效率怎么样不过是个方法
代码如下:
select substring(convert(char,registdate,120),1,10) as registdate from tbuser
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