tsql how to check if datetime between 9:00pm to 10:pm

i want to check if getdate() is between 9:00 pm and 10:00 pm
LVL 1
AFIF JABADOAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Peter KipropConnect With a Mentor Commented:
Try the below
SELECT  GETDATE() where CONVERT(VARCHAR(8),GETDATE(),108) between '21:00:00' and '22:00:00'

Open in new window


Hope it helps
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.