which query u can write to sql server doesn't work
inbetween 7.00PM to nextday 9.00AM
Answer Posted / sumesh
Declare @hour varchar(100)
set @time=convert(varchar,getdate(),114)
set @hour=SUBSTRING(@time,1,2)
if(convert(int,@hour)>8 and convert(int,@hour)<19)
begin
print @time
print @hour
end
| Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
How to convert numeric expression data types by assignment operations?
Why do we use sql limitations? Which constraints can we use while making a database in sql?
What the different topologies in which replication can be configured?
What is the purpose of the model database?
What is the use of floor function in sql server?
Define Business Edition in SQL Azure?
Do you know what are acid properties of transaction?
Do you know what is xpath?
can SSRS reports Cache results?
What is the difference between varchar and varchar(max) datatypes?
What is the meaning of resultset type_scroll_insensitive?
What is outer join in sql server joins?
What is user defined stored procedures?
Do you know nested transaction?
How to create user defined functions with parameters?