September 24, 2009 at 12:19 pm
Hi,
I am trying to do something like this :
DECLARE @StartDate DATETIME
DECLARE @EndDate DATETIME
DECLARE @TodaysDate DATETIME
SET @TodaysDate = GetDate()
IF (@TodaysDate BETWEEN '8/21/2009' AND '9/24/2009')
BEGIN
SET @StartDate = '8/21/2009'
SET @EndDate = GETDATE()
END
SELECT @StartDate
SELECt @EndDate
I want to get data between @StartDate and @EndDate .
Please advise .
September 24, 2009 at 12:45 pm
Would you mind doing some research before simply starting a new post?
Just by using "dates between" as search criteria I found more than one solution that will answer your question.
September 24, 2009 at 12:48 pm
THANKS .
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply