Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

5 days prior to getDate() 1

Status
Not open for further replies.

jamert

Programmer
Dec 9, 2007
80
CA
Hi there is a column called "ReviewDate"

data in this column is of the following format:
2/18/2008 7:26:16 AM

This column has multiple years. I am writing a stored procedure and would like to grab records where

ReviewDate is 5 days earlier than todays date

How would one do this? thanks
 
getdate()-5

You should also look in the faq section if you need to strip the time portion off the date (as the above will simply remove 5 days of the current date and time).


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top