Reputation: 6085
how do i add datetime ( not current timestamp) but any date and time in 'datetime' field of mysql database in the format 2011-03-18 18:37:06 from php ? does jquery calendar allow time as well or what is the easy way to do so ? any help would be greatly appreceated. Thanks
Upvotes: 1
Views: 3432
Reputation: 787
86400 seconds in a day, times number of days.. and add it to current time.
$nextWeek = time()+86400*7;
echo date("Y-m-d H:i:s", $nextWeek);
Upvotes: 3