title: Update SQL Datefield to add a week BUT keep same time
body: <p>I have a countdown script that works 100% successfully. It's pulling the data down from the database but I'm having a few issues with a cronjob script. I want it to add a week to the community_night date. </p>
  
  <p>When I try adding to this, it keeps resetting the date to 0000-00-00 however I can see that the query should be working correctly.</p>
  
  <pre><code>&lt;?php
  $con = mysqli_connect("localhost","","","") or die("Error in the consult.." . mysqli_error($connect));
  $result = mysqli_query($con,"SELECT * FROM Community_Night");
  while($row = mysqli_fetch_array($result))
  $dbDate = $row['community_night'];
  
  $date = strtotime($dbDate . ' + 1 week');
  $setDate = date('d-m-Y',$date);
  
  $sql = "UPDATE Community_Night SET community_night =" . $setDate;
  
  if (mysqli_query($con, $sql)) {
      echo "Record updated successfully: " . $sql;
      } else {
      echo "Error updating record: " . mysqli_error($con);
  }
  ?&gt;
  </code></pre>
  
  <p>the SQL column is set to DATE.</p>