sql server 获取月份天数:1,SELECT 32-DAY(CAST(‘2015-03-01‘ as datetime)+32-DAY(CAST(‘2015-03-01‘ as datetime)))
2,SELECT 32-DAY(getdate()+32-DAY(getdate()))
3,select convert(char(10),dateadd(d,-1,dateadd(m,1,CAST(‘2015-02-01‘ as datetime))),120):2015-02-28
时间: 2024-11-06 10:00:17