jdGONEMAD
SSC Journeyman
Points: 86
More actions
September 26, 2007 at 9:56 pm
#178962
i have 2 parameters, begin date and end date.
range should be from 1/1/1753 to 12/31/9999
if the date field in null, it displays 1/1/0001
so how do i set the default begin date to 1/1/0001 (or null) if the allowed range should only be from 1/1/1753?
Ninja's_RGR'us
SSC Guru
Points: 294069
September 26, 2007 at 10:05 pm
#736613
SET @SDate = ISNULL(@SDate, '1900-01-01')
SET @EDate = ISNULL(@EDate, '2100-01-01')
SELECT ... WHERE @DateCol BETWEEN @SDate AND @EDate
September 27, 2007 at 5:55 pm
#736977
wow ... thnx for the reply
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply