1.将Date类型变成年月日时分秒的形式
select date_format(claimDate,'%Y-%m-%d %H:%i:%s') as claimdate from t1
2.只要年月日的形式
select date_format(claimdate,'%Y-%m-%d') as newdate from t1
3.获得星期几(英语如Monday,Tuesday...)
select DAYNAME(claimdate) as weekday from t1
本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/xiandedanteng/p/4149019.html,如需转载请自行联系原作者