Elvie Drumgoole: dodate("m/d/Y",time()+86400*14);time() is in seconds (int)each day has 86400 sec so you add 14 times that...Show more
Reginald Maxi: You need to use a timestamp as it allows you to add a number to it. A timestamp can be found using time() and returns the number of seconds since the epoch (look it up on google if interested!).Then add 1,209,600 to this number as this is the number of seconds in 14 days.The full code would be:$time = time() + 1209600;echo $time;This would output the number of seconds, however you can then use the date function as you mentioned to turn it into the correct format e.g:$newtime = date('d m Y', $time);...Show more
Randal Deyarmond: try this code$output = date('Y-m-d h:i:s', mktime(date("h"), date("i"), date("s"), date("m"), date("d")+14, date("Y"))); with regards,A Suresh Kumarhttp://suresh-mobileweb.blogspot.com...Show more
No comments:
Post a Comment