title: date showing 01/01/1970 mysql
body: <p>In my form i have date field but not mandatory(require) when someone forget to fill the date field it get 01/01/1970 by default in database , it not good , i want when it happens it show no date selected i am using this function but its not working any help </p>
  
  <pre><code>            &lt;?php 
              function getDateFormat($date){
                  if($date == '0000-00-00'){
                      return 'No Date Selected.';
                  }
                  else {
                      return date('d-m-Y',strtotime($date));
                  }
              }
                 ?&gt;
  </code></pre>