title: Pyspark: to_date and unix_timestamp return null for some records for others valid values
body: <p>The above command is giving null for few records.
  Can anyone please tell what might be the reason for this. I have tried using to_date and unix_timestamp function but both are giving the same result ( null for few values).</p>
  <pre><code>date_cols.withColumn('date_timestamp',unix_timestamp('Date',&quot;M/dd/y HH:mm:ss a&quot;)).show(truncate=False)
  
  
  |----------------------|----------------------|--------------|
  |Date                  |Updated On            |date_timestamp|
  |----------------------|----------------------|--------------|
  |02/05/2018 01:10:00 AM|02/12/2018 03:49:14 PM|1517793000    |
  |01/23/2018 09:00:00 AM|02/12/2018 03:49:14 PM|1516698000    |
  |01/31/2018 10:12:00 AM|02/12/2018 03:49:14 PM|1517393520    |
  |02/01/2018 02:00:00 PM|02/12/2018 03:49:14 PM|null          |
  |01/27/2018 09:00:00 PM|02/12/2018 03:49:14 PM|null          |
  |02/02/2018 12:00:00 PM|02/12/2018 03:49:14 PM|1517572800    |
  |01/28/2018 07:00:00 PM|02/12/2018 03:49:14 PM|null          |
  |01/10/2018 04:45:00 PM|02/12/2018 03:49:14 PM|null          |
  |01/03/2018 03:45:00 PM|02/12/2018 03:49:14 PM|null          |
  |02/04/2018 04:00:00 PM|02/12/2018 03:49:14 PM|null          |
  |01/27/2018 07:00:00 AM|02/12/2018 03:49:14 PM|1517036400    |
  |02/05/2018 12:00:00 AM|02/12/2018 03:49:14 PM|null          |
  |01/21/2018 02:00:00 AM|02/12/2018 03:49:14 PM|1516500000    |
  |02/02/2018 12:45:00 AM|02/12/2018 03:49:14 PM|null          |
  |01/25/2018 01:14:00 PM|02/12/2018 03:49:14 PM|null          |
  |02/05/2018 05:00:00 PM|02/12/2018 03:49:14 PM|null          |
  |01/15/2018 12:00:00 AM|02/12/2018 03:49:14 PM|null          |
  |02/05/2018 07:30:00 PM|02/12/2018 03:49:14 PM|null          |
  |02/02/2018 08:30:00 PM|02/12/2018 03:49:14 PM|null          |
  |02/03/2018 06:00:00 PM|02/12/2018 03:49:14 PM|null          |
  +----------------------+----------------------+--------------+
  </code></pre>