title: How to convert date format from dd/mm/yyyy to yyyy-mm-dd using carbon on Laravel
body: <p>I have small laravel project working on date conversion. I have date string that getting from request on format dd/mm/yyyy. Code and result show as below.</p>
  
  <pre><code>$request-&gt;stockupdate ; 
  // dd/mm/yyyy (02/05/2019)
  </code></pre>
  
  <p>Then I try to convert to yyyy-mm-dd using carbon.</p>
  
  <pre><code>$_stockupdate= Carbon::parse($request-&gt;stockupdate)-&gt;format('Y-m-d'); 
  </code></pre>
  
  <p>I got parse result as below.</p>
  
  <pre><code>2019/02/05  // Seem it is 2 Feb 2019 not 5 May 2019.
  </code></pre>
  
  <p>That's wrong, It should be 2019/05/02 instead. Any advise or guidance would be greatly appreciated, Thanks.</p>