title: Check valid date in zend framework
body: <p>I am using zend framework 1.12.0 and i have a value fetching from database to be validated.
  That is if its a date value then i have to change the format into YYYY-MM-DD to MM/DD/YYYY.Else i  keep the value as ''.I am using the following code</p>
  
  <pre><code>    $validator = new Zend_Validate_Date();
      if(trim($value)=='0000-00-00' || $validator-&gt;isValid(trim($value))){
           if($validator-&gt;isValid(trim($value))){
                 $utilObj     =   new Utilityclass();
                 $arrayReturn[$key]   =   $utilObj-&gt;getDateMdy($value,"/");
            }
            else{
                 $arrayReturn[$key]       =   '';
            }
       }
  </code></pre>
  
  <p>My problem is that the date value may be in YYYY-MM-DD or YYYY-MM-DD H:i:s format.So when its YYYY-MM-DD i am getting the correct output.If its YYYY-MM-DD H:i:s its not converting the format.So how to check a value is a valid date if its in YYYY-MM-DD or YYYY-MM-DD H:i:s format using zend.</p>