数学丢废了好久了

今天用sql碰到计算某个日期的前后n天日期

但为前n天挠了好久

想了好久才写了个整数取反函数

Function unabs(num)

     unabs=0-num

End Function

 

sql:
select * from Tables where rq>=convert(char(10),dateadd(day,0-20,@ktybrq),20) and rq<@ktybrq
select * from Tables where rq>=@ktybrq and rq<=convert(char(10),dateadd(day,20,@ktybrq),20)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2022-02-23
  • 2021-09-22
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
猜你喜欢
  • 2021-12-23
  • 2021-10-12
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案