Home All Groups Group Topic Archive Search About
Author
1 Sep 2005 10:31 PM
smk23
In TSQL how would I set my WHERE clause to pull records with ApptDate in the
past 3 months i.e. > (today-90 days) ?

TIA
--
sam

Author
1 Sep 2005 11:14 PM
Yosh
SELECT DATEADD(Day, -90, GETDATE())

-or-

ApptDate > DATEADD(Day, -90, GETDATE())

Hope this is a start.



Show quote
"smk23" <sm***@discussions.microsoft.com> wrote in message news:CED4F611-66E2-44A5-90E3-547E2CE955FA@microsoft.com...
> In TSQL how would I set my WHERE clause to pull records with ApptDate in the
> past 3 months i.e. > (today-90 days) ?
>
> TIA
> --
> sam
Author
2 Sep 2005 12:59 PM
Perayu
Can you try:
DateAdd(mm, 3, ApptDate) < getdate().

Perayu


Show quote
"smk23" <sm***@discussions.microsoft.com> wrote in message
news:CED4F611-66E2-44A5-90E3-547E2CE955FA@microsoft.com...
> In TSQL how would I set my WHERE clause to pull records with ApptDate in
> the
> past 3 months i.e. > (today-90 days) ?
>
> TIA
> --
> sam

AddThis Social Bookmark Button