April 5, 2013 at 9:58 am
Hi
Does anyone know how I can setup this where statement to
have @enddate be now() if the date is in the future?
(calendarDate BETWEEN @startdate AND @enddate)
Thanks
Joe
April 5, 2013 at 10:02 am
jbalbo (4/5/2013)
HiDoes anyone know how I can setup this where statement to
have @enddate be now() if the date is in the future?
(calendarDate BETWEEN @startdate AND @enddate)
Thanks
Joe
Curious how hard you really tried to solve this yourself.
calendarDate BETWEEN @startdate AND case when @enddate > getdate() then getdate() else @enddate end
April 5, 2013 at 11:59 am
Thanks and sorry....
I was caught up with something and should have thought it out before I posted it
April 5, 2013 at 12:01 pm
jbalbo (4/5/2013)
Thanks and sorry....I was caught up with something and should have thought it out before I posted it
Just one of those so simple ones. Happens at times.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply