title: Getting null while converting string to date in spark sql
body: <p>I have dates in the format '6/30/2020'. It is a string and I want to convert it into date format.</p>
  <p>List of methods I have tried</p>
  <pre><code>Cast('6/30/2020' as date) #returns null
  to_date('6/30/2020','yyyy/MM/dd') #returns null
  </code></pre>
  <p>I also tried splitting the string and then concatenating it into data.
  After trying all this and putting all the possible combinations in the to_date function, I am still getting the answer as null.</p>
  <p>Now I am confused as I have used all the functions to convert string to date.
  Thanks in advance for your help.</p>