Thanks Chris. It has been a while since I used this command. Ron
On Mon, 2009-04-20 at 13:27 +1000, Chris wrote:
> Ron Piggott wrote:
> > Where $date_reference is 2009-04-18 the following code gives me a day of
> > 1969-12-30. How do I get it to be 2009-04-17?
> >
> > $previous_date = strtotime("-1 days", $date_reference);
> > $previous_date = date('Y-m-d', $previous_date);
>
> Slightly wrong syntax.
>
> $previous_date = strtotime("$date_reference -1 days");
>

