STR_TO_DATE incorrect datetime mysql
<p>I have tried to search many questions about this.. But it seems telling solutions about <em>Quotes</em> use.</p>

<p><em>references</em> : <a href="https://stackoverflow.com/questions/12198332/1411-incorrect-datetime-value-for-function-str-to-date-on-insert-into-selec"><strong>1</strong></a>, <a href="https://stackoverflow.com/questions/37824483/error-code-1411-incorrect-datetime-value-0000-00-00-for-function-str-to-dat"><strong>2</strong></a>, <a href="https://stackoverflow.com/questions/31789072/warning-code-1411-incorrect-datetime-value"><strong>3</strong></a>, <a href="https://stackoverflow.com/questions/14961490/mysql-error-code-1411-incorrect-datetime-value-for-function-str-to-date"><strong>4</strong></a>  </p>

<p>In my case,</p>

<pre><code>select STR_TO_DATE('17-08-2016 11:30:51 AM','%d/%m/%Y %h:%i:%s %p');
</code></pre>

<p>gives output <code>NULL</code>.<br>
And In <code>INSERT</code> statement:</p>

<pre><code>INSERT INTO BILLING(BILL_NUMBER,BILLING_DATE)
VALUES ('1',STR_TO_DATE('17-08-2016 11:30:51 AM','%d/%m/%Y %h:%i:%s %p'));
</code></pre>

<p>It throws Error :  </p>

<blockquote>
  <p>Error Code: 1411. Incorrect datetime value: '17-08-2016 11:30:51 AM'
  for function str_to_date</p>
</blockquote>

<p>NOTE: 1. Date format is fixed > <code>'%d/%m/%Y %h:%i:%s %p'</code><br>
    2.   And String format is also fixed > <code>'17-08-2016 11:30:51 AM'</code> which I am capturing from C# Service.</p>

<p>Thanks In Advance!</p>