SQL DateAdd 23:59:59


DECLARE @newDate DATETIME
SET @newDate = GETDATE()

SELECT @newDate = DATEADD(dd, 0, DATEDIFF(dd, 0, @newDate))
SELECT @newDate = DATEADD(Hour, 23, @newDate)
SELECT @newDate = DATEADD(Minute, 59, @newDate)
SELECT @newDate = DATEADD(Second, 59, @newDate)

SELECT @newDate
Related Posts Plugin for WordPress, Blogger...