select convert(varchar(10),dateadd(dd,number,dateadd(month,-1,getdate())),120) as dt
from master..spt_values 
where type='P' and 
dateadd(dd,number,dateadd(month,-1,getdate()))<=getdate()
---------------------
作者:a-b-d
来源:CSDN
原文:https://blog.csdn.net/a6622004/article/details/80911072
版权声明:本文为博主原创文章,转载请附上博文链接!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-29
  • 2022-01-04
  • 2022-01-11
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案