Query to add Hours in Date-time

Posted by Virendradugar under Sql Server category on | Views : 3235

Select DateAdd(hh,5,Getdate())

Above query will add 5 hours in current time. If you pass 5.5 or any other decimal value then it will only add the int part of it to the current time. If you pass only .5 then it will not add anything.

Virendra Dugar

Comments or Responses

Login to post response