This topic is locked

Exclude old records according to date in date field

12/2/2007 11:50:00 AM
ASPRunnerPro General questions
M
mfred author

I have a project where we want to have the list automatically exclude records older than 2 weeks from the current date, based on a date field.

D
dlangham 12/2/2007

I have a project where we want to have the list automatically exclude records older than 2 weeks from the current date, based on a date field.



Try using the following code in your SQL Statement:

WHERE DATEPART(Wk, YOUR_DATE_FIELD)>=Now()-2