Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat. The purpose of this eBook is to educate the reader about ransomware attacks.
--This is how it currently works...we want to check the *hour* DECLARE @CUTOFF DATETIME declare @poDate datetime SET @CUTOFF = dateadd(hour,16,CONVERT(VARCHAR,GETDATE(),101)) set @poDate ='2011-02-04 10:38:00.000' -- Then compare If @poDate <= @cutoff Begin ..... End ------ This is what i want to do ----------- -- But for cutoff date, I created a table with values like this, looking at the *hour* --1900-01-01 15:00:00.000 --1900-01-01 19:00:00.000 create table #cutoff ( id int identity, shipmethod varchar(20), cutoffHour datetime ) insert into #cutoff ('USPS','1900-01-01 16:00:00.000') insert into #cutoff ('UPSA','1900-01-01 19:00:00.000') /* But now, the date is "1900-01-01" and I cant just do a comparision. I think I need to somehow get the "date" part from getdate() and concat it to Time part and then do the comparision. */ select @cutoffhour = cutoffhour from #cutoff --somehow concat Date of getdate to time from cutoff hour If @poDate <= @cutoffHour Begin ..... End