Gossamer Forum
Home : Products : DBMan : Customization :

Date to weak to delete...

Quote Reply
Date to weak to delete...
<xmp>
Hello,
I will have a database that will need to purge records after they are one week old. I would like this to happen during the adding process. Here is what I am thinking...

I have a DATE field and a TIME field. In the new sub somewhere, could I say:
Open db;
foreach record
$howold = $rec{'DATE'}.$rec{'TIME'};
if ($howold < &get_date(time()-604800) Wink {
delete record

This is just pseudo. Could you help me get what I want?


</xmp>

[This message has been edited by Chris071371 (edited August 06, 1999).]
Quote Reply
Re: Date to weak to delete... In reply to
Take a look at http://www.gossamer-threads.com/scripts/forum/resources/Forum5/HTML/000765.html

Scroll down till you find the post by Alex. I think it was on 26 March.

That should give you a good start.


------------------
JPD