Sean Monteverdi
|
Posted: 01/25/2002, 11:37 AM |
|
I have a links site that has Links table. The primary key is LinkID. I have a Date_Added field that gets filled in when a user adds a new link record and a isNew checkbox that gets marked 1. What I'm trying to do is build a 'What's New' page that only shows links for two weeks after the Date_Added date. I'm thinking to have is so when the new record gets added it would mark the isNew field to 1 and these records would be shown on the What's New page. But how do I get it so after 14 days it marks isNew to 0 and therefore will no longer be displayed on the What's New page. Maybe I'm steering in the wrong direction or am I missing something simple?
|
|
|
tom
|
Posted: 01/25/2002, 1:40 PM |
|
It would be easier to write a simple sql statement to display records > now()-14 days. It's great that you have the date_added field. I'd just use that instead of the Is New field.
Go into the form sql and add a where clause that puts a criteria on date.
Good luck
|
|
|
Sean Monteverdi
|
Posted: 01/25/2002, 4:03 PM |
|
Thanks Tom... I got this code from support..
CutOffDate = dateAdd("d", -14, date())
swhere = "where Date_Added >= #" & CutOffDate & "#"
that I put in the form/open of the What's New page... got any idea how to have the main grid page insert text that says 'new' next to a new record ?
|
|
|
|