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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When DATE change it changes a Variable

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi everybody,

I am creating a forum and I need to create a way to give a post an expiry date. When it expire it'll delete the post from the Database.

I was thinking if I create a variable that changes when the NOW DATE changes, for when the variable to reach 10 it'll do delete.

But How can I code that? or is there a better way to do this?
 
Just put a time stamp when you add the post to the database. Then in your code that opens these up or allows you to view these it will write.

If PostedDate > (Date() + 10) then
RunPostDelete
Else
ViewPost
End IF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top