title: Converting Unix Timestamp to MySQL DATETIME
body: <p>This sounds silly but for the life of me I cannot figure it out. I have tried everything.</p>
  
  <p>The problem is that I cannot figure out how to get my date string into my MySQL table... I've been converting to Unix first to account for variations in input format..</p>
  
  <p><code>$_POST['date']</code> is in this format:19-1-2013 4:43:32</p>
  
  <pre><code>$datestr= strtotime($_POST['date']);
      echo $datestr;
      $sql = "INSERT INTO `calendar` (`date`, `title`, `event`) VALUES ('FROM_UNIXTIME(".$datestr.")', '".mysql_real_escape_string($_POST['title'])."', '".mysql_real_escape_string($_POST['desc'])."')";
      $query = mysql_query($sql);
  </code></pre>
  
  <p>This is the most recent thing I've tried and I'm still getting all zeros in my DATETIME field. </p>
  
  <p>Please, what am I doing wrong?</p>