Home Forums Article Discussions Article Discussions by Author Discuss content posted by Kaifi What will happen? RE: What will happen?
Mike Is Here
Hall of Fame
Points: 3348
More actions
September 1, 2010 at 6:47 am
#1214907
This is how we get the date for the current day without time element
DECLARE @a INT
DECLARE @b-2 DATETIME
set @b-2 = GETDATE()-.5
SET @a = CONVERT(INT,@b)
SELECT CONVERT(DATETIME, @a), @b-2
the -.5 is half a day because CONVERT(INT,@b) rounds