当前位置:Gxlcms > 数据库问题 > mysql从时间字符串中取出日期数据

mysql从时间字符串中取出日期数据

时间:2021-07-01 10:21:17 帮助过:2人阅读

addtime=‘2016-09-03 18:12:44‘

substr(addtime,1,10)  as 创建日期

SUBSTR(string, string charcter, number of charcters)
参数含义:
string:为字符列或字符串表达式
string charcter:子串的起始位置
number of charcters:返回字符的个数

 

mysql从时间字符串中取出日期数据

标签:

人气教程排行