"Jim in Arizona" <> wrote in message
news:...
>> "SELECT * FROM TableA " & _
>> "WHERE DateColumn <= " & _
>> "DATEADD(d, -3, CONVERT(datetime, CONVERT(varchar, getdate(), 106)))"
> So, this works just as good on the vb code side:
>
> Dim BeginDate As Date = DateAdd(DateInterval.Day, -3, DateAndTime.Today)
Yep.
> So, which would be more effective, do you think? Using DateAdd in the vb
> code or in the SQL? I plan on using an SQL Stored Proc for the SQL instead
> of storing it in a string on the vb code side.
I don't suppose it matters *too* much in the general scheme of things -
however, I tend to use a stored procedure whenever I can because of its
precompiled execution plan...
|