sql add 3 hours to date code example
Example 1: sql last 7 days
SELECT id, NewsHeadline as news_headline, NewsText as news_text, state CreatedDate as created_on
FROM News
WHERE CreatedDate >= DATEADD(day,-7, GETDATE())
Example 2: datetime add 2 hours sql
DATEADD(HOUR, 2, GETUTCDATE())
Example 3: CONVERT time string into 12 hours in sql
declare @t time
set @t = '14:40'
select CONVERT(varchar(15),@t,100)