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