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

How to convert date to string type in mysql

藏色散人
藏色散人Original
2020-11-13 09:46:5220763browse

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');

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');

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!

Statement:
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