September 1, 2005 at 4:53 pm
In TSQL how would I set my WHERE clause to pull records with v.ApptDate in the past 3 months i.e. > (today-90 days) ?
TIA
September 1, 2005 at 4:54 pm
See the DateAdd and getdate functions
dateadd( "d", -90, getdate() )
dateadd( "mm", -3, getdate() ) etc.
September 1, 2005 at 5:27 pm
Make sure you don't use a function on a column (bad for performance).
Also please not that 90 days and 3 months are not the same thing .
September 1, 2005 at 5:58 pm
Thanks guys!
Sam
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy