Home > Database > Mysql Tutorial > How to convert date to string type in mysql

How to convert date to string type in mysql

藏色散人
Release: 2020-11-13 09:46:52
Original
20759 people have browsed it

In mysql, you can use the "select date_format('2008-08-08 08:08:08', '%Y%m%d%H%i%s');" statement to convert the date type is a string.

How to convert date to string type in mysql

Recommended: "mysql video tutorial"

MySQL date and time type conversion string

Convert date/time type to string type

date_format(date,format):date to string

select date_format('2008-08-08 08:08:08', '%Y%m%d%H%i%s');
Copy after login

How to convert date to string type in mysql

time_format( time,format): time to string

select time_format('08:08:08', '%H%i%s');
Copy after login

How to convert date to string type in mysql

The above is the detailed content of How to convert date to string type in mysql. For more information, please follow other related articles on the PHP Chinese website!

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