title: A two digit month could not be found Data missing in Laravel
body: <p>I'm having a table where I'm storing the data in date format through datepicker. While storing the date I'm doing something like this:</p>
  
  <pre><code>$data['schedule'] = Carbon::parse($request-&gt;schedule)-&gt;toDateTimeString();
  </code></pre>
  
  <p>then in model I've defined like following:</p>
  
  <pre><code>protected $dates = [
      'schedule', 'created_at', 'updated_at', 'deleted_at'
  ];
  </code></pre>
  
  <p>Now while retrieving the date I'm using <code>diffForHumans()</code> something like this:</p>
  
  <pre><code>$event-&gt;schedule = $event-&gt;schedule-&gt;diffForHumans();
  </code></pre>
  
  <p>But it is throwing an error like this:</p>
  
  <blockquote>
    <p>A two digit month could not be found. Data missing</p>
  </blockquote>
  
  <p>I checked mySQL database for the format , I'm having dates like this:</p>
  
  <pre><code>2017-07-02 14:38:23
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <p>Previously I was having an issue while storing the date in tables, please refer to <a href="https://stackoverflow.com/questions/44275671/how-to-format-date-receiving-through-vuejs-datepicker-in-laravel">How to format date receiving through Vuejs Datepicker in laravel</a> for the detailed description. It throws error of:</p>
  
  <blockquote>
    <p>Invalid datetime format: 1292 Incorrect datetime value: '2017-05-04T18:30:00.000Z' for column 'schedule' at row 1</p>
  </blockquote>
  
  <p>So I chose to use <code>Carbon::parse</code> while storing it in database.</p>
  
  <p>How to resolve this, help me out.</p>
  
  <p>Thanks.</p>