1 DECLARE @startDate1 DATE;
2 DECLARE @startDate DATETIME;
3 SET @startDate1=GETDATE();SELECT @startDate=DATEADD(DAY,-1,@startDate1); 
4 DECLARE @endDate DATETIME ;SET @endDate=DATEADD(second,-1,CONVERT(DATETIME,@startDate1)); 
5 SELECT @startDate startDate,@endDate endDate;
6 
7 startDate               endDate
8 ----------------------- -----------------------
9 2014-05-19 00:00:00.000 2014-05-19 23:59:59.000

 

相关文章:

  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案