Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想计算一个日期的天数。
例如,我们有@date='03/16/2012'. 我想知道到目前为止的天数。
@date='03/16/2012'
我该怎么做?
datediff(day, @date, getdate())
日期差异