Hi everyone,
I’m trying to output a due date based upon a date plus an amount of days, I’ve tried a few options. At the moment my code is;-
[php]$due_date = $row[‘date’]+$row[‘payment’];
echo “
so for example the ‘date’ value is 2015-10-01 and the payment value is ‘60’ - this being 60 days. The above code just adds 60 to the value and outputs ‘2075’.
I also tried the below and thought I was onto a winner but no joy…
[php]$date = date_create($row[‘date’]);
date_add($date, date_interval_create_from_date_string("$row[‘payment’] days"));
echo “
echo date_format($date, ‘Y-m-d’);
echo “
thanks