When you are storing the news/notices in your database, create a additional "timestored" field where you will store the date/time of when the news/notice was posted.
A good way of retrieving the time is http://www.php.net/time.
To find the 7 day difference, simply count the number of seconds there are in 7 days.
7 x 24(hours) x 60(mins) x 60(seconds) = 604800
So what you do is when the user login into the page, retrieve the current time date using time() and then do some maths to the time stored in the database.
If ($currenttime - $time_in_db > 604800) {
echo "this is old news";
} else {
echo "this news is posted within the last 7 days";
}