title: Converting pattern of date in spark dataframe
body: <p>I have a column in spark dataframe of String datatype (with date in yyyy-MM-dd pattern)
  I want to display the column value in MM/dd/yyyy pattern </p>
  
  <p>My data is </p>
  
  <pre><code>val df = sc.parallelize(Array(
    ("steak", "1990-01-01", "2000-01-01", 150),
    ("steak", "2000-01-02", "2001-01-13", 180),
    ("fish",  "1990-01-01", "2001-01-01", 100)
  )).toDF("name", "startDate", "endDate", "price")
  
  df.show()
  
  +-----+----------+----------+-----+
  | name| startDate|   endDate|price|
  +-----+----------+----------+-----+
  |steak|1990-01-01|2000-01-01|  150|
  |steak|2000-01-02|2001-01-13|  180|
  | fish|1990-01-01|2001-01-01|  100|
  +-----+----------+----------+-----+
  
  root
   |-- name: string (nullable = true)
   |-- startDate: string (nullable = true)
   |-- endDate: string (nullable = true)
   |-- price: integer (nullable = false)
  </code></pre>
  
  <p>I want to show endDate in MM/dd/yyyy pattern. All I am able to do is convert the column to DateType from String</p>
  
  <pre><code>val df2 = df.select($"endDate".cast(DateType).alias("endDate"))
  
  df2.show()
  
  +----------+
  |   endDate|
  +----------+
  |2000-01-01|
  |2001-01-13|
  |2001-01-01|
  +----------+
  
  df2.printSchema()
  
  root
   |-- endDate: date (nullable = true)
  </code></pre>
  
  <p>I want to show endDate in MM/dd/yyyy pattern. Only reference I found is <a href="https://stackoverflow.com/questions/36948012/how-to-change-the-column-type-from-string-to-date-in-dataframes">this</a> which doesn't solve the problem</p>