获取 日期 最后一天

方法不少: (这种我以为最好)sql

select  dateadd( day ,-1,dateadd( month ,1, '2008-06' + '-01' ))
/*
2008-06-30 00:00:00.000
*/
 

DECLARE @a DATETIMEcode

SET @a='2014-03-15'server

 SELECT DATEADD(month, DATEDIFF(month, '19991231', @a), '19991231');string

 

 

还有  sql server 系列丛书class

 

日期描点  一说。date

相关文章
相关标签/搜索