title: to_date fails to parse date in Spark 3.0
body: <p>I am trying to parse date using <code>to_date()</code> but I get the following exception.</p>
  <blockquote>
  <p>SparkUpgradeException: You may get a different result due to the upgrading of Spark 3.0: Fail to parse '12/1/2010 8:26' in the new parser. You can set spark.sql.legacy.timeParserPolicy to LEGACY to restore the behavior before Spark 3.0, or set to CORRECTED and treat it as an invalid datetime string.</p>
  </blockquote>
  <p>The exception suggests I should use a legacy Time Parser, for starter I don't know how to set it to Legacy.</p>
  <p>Here is my implementation</p>
  <pre><code>dfWithDate = df.withColumn(&quot;date&quot;, to_date(col(&quot;InvoiceDate&quot;), &quot;MM/dd/yyyy&quot;))
  </code></pre>
  <p>my date is in following format</p>
  <pre><code>+--------------+
  |   InvoiceDate|
  +--------------+
  |12/1/2010 8:26|
  |12/1/2010 8:26|
  |12/1/2010 8:26|
  |12/1/2010 8:26|
  |12/1/2010 8:26|
  </code></pre>