title: Why am I getting and invalid QDateTime object?
body: <p>My code looks like this</p>
  
  <pre><code>std::string date = "04/05/2015 02:07";
  std::string format = "MM/dd/yyyy HH:mm";
  
  QDateTime dateTime = QDateTime::fromString(date.c_str(), format.c_str());
  
  bool isItValid = dateTime.isValid();
  </code></pre>
  
  <p>This is part of a function I have but I narrowed the problem to specifically that value for date. After executing, <code>isItValid</code> is <code>false</code>. Why is it not a valid date?</p>
  
  <p>However, if I try</p>
  
  <pre><code>bool isItValid = dateTime.date().isValid() &amp;&amp; dateTime.time().isValid();
  </code></pre>
  
  <p>the value is true.</p>
  
  <p>Can anyone point out what's the problem with that date? what am I missing?</p>