2016-08-05 106 views

回答

0

有了這個是這樣的,你獲得當月的天數:

SELECT datediff(CONCAT(y, '-', (m + 1), '-', '01'), CONCAT(y, '-', m, '-', '01')) FROM (SELECT month(current_date) as m, year(current_date) as y, day(current_date)) t 
+0

非常感謝。讓我測試它 – Ram