Given a time, how can I find the time one month ago.
A:
In php you can use strtotime("-1 month"). Check out the documentation here: http://ca3.php.net/strtotime
justinl
2009-12-30 05:28:26
A:
<?php
$date = new DateTime("18-July-2008 16:30:30");
echo $date->format("d-m-Y H:i:s").'<br />';
date_sub($date, new DateInterval("P1M"));
echo '<br />'.$date->format("d-m-Y").' : 1 Month';
?>
Kirill V. Lyadvinsky
2009-12-30 05:29:42