declare @p_date smalldatetimeset @p_date = '5/15/2007' --or any date you like
In this case, the result would be 3.
Cool. Will give it a try. Thanks.