Adding the int in DATE

Bageshkumarbagi
Posted by Bageshkumarbagi under Sql Server category on | Points: 40 | Views : 763
Hi,

DECLARE @startdate datetime, @adddays int
SET @startdate = '8/29/2013 12:00 AM'
SET @adddays = 5
SELECT @startdate + 1.75 AS 'Start Date',
@startdate + @adddays+1.6 AS 'Add Date'

**********OutPut***********
Start Date Add Date
2013-08-30 18:00:00.000 2013-09-04 14:24:00.000

Comments or Responses

Login to post response