Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Sqlsever judgment time interval

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Declare @ app_change_web_start nvarchar, @ app_change_web_end nvarchar, @ now nvarchar

Set @ app_change_web_start='05:55:00'

Set @ app_change_web_end='06:02:00'

Print @ app_change_web_start

Print @ app_change_web_end

Declare @ date nvarchar

Select @ date=CONVERT (varchar, GETDATE (), 23)

Print @ date

Set @ now = CONVERT (varchar, GETDATE (), 24)

Print @ now

Declare @ startCha int,@endCha int

Set @ startCha = DATEDIFF (ms,@app_change_web_start,@now)

Set @ endCha=DATEDIFF (ms,@now,@app_change_web_end)

Print @ startCha

Print @ endCha

-- [dbo]. [APP_changeCreateMethod_job]

If @ startCha > 0 and @ endCha > 0-within the interval

Begin

End

Else

Begin

End

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report