mysql怎么将时间戳转换为字符串

博主:xiaoweixiaowei 2022-12-28 条评论

mysql中时间、时间戳与字符串之间相互转换的方法

1.时间戳转字符串

from_unixtime(1579422064202,'%Y-%d')

2.字符串转时间戳

unix_timestamp('2020-01-19')

3.时间转字符串

date_format(now(),'%Y-%m-%d')

4.时间转时间戳

unix_timestamp(now())

5.字符串转时间

str_to_date('2020-01-19','%Y-%m-%d %H')

6.时间戳转时间

mysql怎么将时间戳转换为字符串
from_unixtime(1579422064202)

The End

发布于:2022-12-28,除非注明,否则均为 主机评测原创文章,转载请注明出处。