Home > Backend Development > PHP Tutorial > Use the convert function to convert. . . _PHP Tutorial

Use the convert function to convert. . . _PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 11:00:10
Original
1061 people have browsed it

Add the convert conversion to the query. . .
convert(varchar(10), field name, conversion format)
For example:
select user_id,convert(varchar(10),date,11) as date from tb_user
Conversion format:
0 or 100 month dd yyyy hh:miAMPM
1 mm/dd/yy
2 yy.mm.dd
3 dd/mm/yy
4 dd.mm.yy
5 dd-mm-yy
6 dd month yy
7 month dd,yy
8 hh:mi:ss
9 or 109 month dd yyyy hh:mi:ss:mmmAMPM
10 mm -dd-yy
11 yy/mm/dd
12 yymmdd
101 mm/dd/yyyy
102 yyyy.mm.dd
103 dd/mm/yyyy
104 dd .mm.yyyy
105 dd-mm-yyyy
106 dd month yyyy
107 month dd,yyyy
108 hh:mi:ss
110 mm-dd-yyyy
111 yyyy/mm/dd
112 yyyymmdd

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631819.htmlTechArticleAdd convert conversion in the query. . . convert(varchar(10), field name, conversion format) For example: select user_id,convert(varchar(10),date,11) as date from tb_user Conversion format: 0 or 1...
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