Forums

This topic is locked

Automaticaly generate a new date one month later ?

Posted 13 Sep 2002 16:27:39
1
has voted
13 Sep 2002 16:27:39 Berry van Elk posted:
I'm building a database with al kind of cars, people can post their one car for free but only for one month, after a month the post wil dissapear. So what i need is a END DATE Field in the database, so i have a start date, that is the date of the day the car is posted, and now i need a code that automaticly create a new date but a month later, so if a user post a car the BEGIN_DATE should be 13-9-2002 and the END_DATE would be 13-10-2002.

Anyone can help me with this ? I hope it is simple, if i have the END_DATE i can filter the rest myself.

Thanks

Replies

Replied 13 Sep 2002 18:03:48
13 Sep 2002 18:03:48 Ken Dobson replied:
On your form, create a text field and then put the following for the init value:

<%=Date()+30%>


For just this one field on a form, the code would look like this:

<form name="form1" method="post" action="">
<input name="textfield" type="text" value="<%=Date()+30%>">
</form>
Replied 13 Sep 2002 20:30:55
13 Sep 2002 20:30:55 Berry van Elk replied:
Ok, thanks
I hoped it was simple

Reply to this topic