how to add datetime in sql code example
Example 1: sql server add time to date
DECLARE @date DATETIME
SET @date='2010-10-01'
SET @date=@date+'15:00:00'
SELECT @date AS DATETIME
Example 2: add time to date sql
ADDTIME(NOW(),'5:30:00')
DECLARE @date DATETIME
SET @date='2010-10-01'
SET @date=@date+'15:00:00'
SELECT @date AS DATETIME
ADDTIME(NOW(),'5:30:00')