码迷,mamicode.com
首页 > 数据库 > 详细

mysql获取日期(将时间戳转换成短日期格式)

时间:2014-12-28 11:36:26      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:

且看如下:

select date_format(create_time,%Y.%m.%d),create_time from vs_article where article_id=20;

 

结果:

+-------------------------------------+---------------------+
| date_format(create_time,%Y-%m.%d) | create_time         |
+-------------------------------------+---------------------+
| 2014-12.17                          | 2014-12-17 11:44:03 |
+-------------------------------------+---------------------+
1 row in set

 

mysql获取日期(将时间戳转换成短日期格式)

标签:

原文地址:http://www.cnblogs.com/feijian/p/4189703.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!