This topic is locked

date add

1/7/2008 9:42:38 AM
PHPRunner General questions
G
garethp authorDevClub member

I think this is a simple one but I just can not get it to work.
I would like the default value of a date field to be the current date plus 3 days when the user adds a new record.
I can get the curent date easily by using now() as the default in visual editor.
Any help would be greatly appreciated.

J
Jane 1/9/2008

Hi,
try to use this one:

date("Y-m-d h:i:s",strtotime("+3 day"))

G
garethp authorDevClub member 1/9/2008

Jane - you are a genius.
Thanks thanks so much