sql server - How to retrieve next 5 hours data from the table in sql -
select * tablename text_date < getdate() , text_date < dateadd(minute, 300, getdate())
is there wrong in this?
try 1 -
declare @data datetime select @data = getdate() select * tablename text_date between @data , dateadd(minute, 300, @data)
Comments
Post a Comment