Mysql date_format()函數處理時間格式

今天項目有個字段須要MM-dd的日期格式,數據庫裏是yyyy-MM-dd hh:mm:ss格式,查閱了一番度娘,用date_format()函數解決。 SELECT SUM(d.shopIntegra) total, DATE_FORMAT(d.integraDate,'%m-%d') dates FROM tb_gra_detail_info AS d WHERE date_sub(CURDAT
相關文章
相關標籤/搜索