Log in

View Full Version : php mysql timing



mutago
04-18-2014, 10:36 PM
I am trying to create an application that will expire in 30 days from the time of the product entry into database.



my question is how do i convert 30 days into time and then insert into mysql database via insert statements or php so that inside database, i will have the time set to 30 days

Deadweight
04-18-2014, 10:59 PM
<?php
date_default_timezone_set('UTC');
echo date('Y-m-d', strtotime("+30 days"));
?>
Like this?

mutago
04-18-2014, 11:57 PM
awesome. thank you so much

Deadweight
04-19-2014, 01:41 AM
No problem. If thta is it and you dont have anymore questions please 'Resolve your thread' by:
Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved