adding 30 minutes to datetime php/mysql

If you are using MySQL you can do it like this:

SELECT '2008-12-31 23:59:59' + INTERVAL 30 MINUTE;

For a pure PHP solution use strtotime

strtotime('+ 30 minute',$yourdate);

Leave a Comment