T-SQL Tutorial

How to add hour to date T-SQL


Add hour

How to add hour to date DATEADD function with getdate, sysdatetime, current_timestamp.

Examples

select dateadd(MI, 60, '2018-01-06 18:01:13.777');

select dateadd(HH, 1, '2018-01-06 18:01:13.777');

select dateadd(HOUR, 3, '2018-01-06 18:01:13.777');





select dateadd(HOUR, 1, getdate());

select dateadd(HOUR, 2, sysdatetime());

select dateadd(HOUR, 3, current_timestamp);