In my database, there are some liveDates that are 0000-00-00 but when I run mysqli query and display the results, the liveDate is displaying 11-30--0001,
this only started happening when I introduced this code to display the dates as d-m-Y
<td>".date("m-d-Y",strtotime($row["liveDate"]))."</td>
PHP
echo "<tr><th>ID</th><th>Amount</th><th>Date</th><th>Method</th><th>Status</th><th>Live Date</th><th>Edit</th></tr>";
// output data of each row
while($row=mysqli_fetch_assoc($depositresult)) {
echo "<tr><td>".$row["id"]."</td>
<td>£".$row["amount"]."</td>
<td>".date("m-d-Y",strtotime($row["date"]))."</td>
<td>".$row["method"]."</td>
<td>".$row["status"]."</td>
<td>".date("m-d-Y",strtotime($row["liveDate"]))."</td>
<td><a href='edit-deposit.php?GetID=".$row['id']."'>Edit</a></td></tr>";
}
// table footer
echo "</table>";
it should be returning the liveDate as 00-00-0000 as the liveDate in the database table is 0000-00-00
if there is a date e.g. 2019-03-11 it works fine