Hello
I need to check whether current time comes in between start time and end time.
current time
DECLARE @UTCTime As DATETIME;
SET @UTCTime = GETUTCDATE();
select DATEADD(MI, 330, @UTCTime) as now
for eg:
if current time - '1:42:44 AM'
start time - '12:00:00 AM' , end time - '6:00:00 AM'
how to write query to get result?
my query not working
SELECT 'yes' where
'1:42:44 AM' >= '12:00:00 AM'
and
'1:42:44 AM' <= '6:00:00 AM'