title: convert date format from MM/dd/yyyy to yyyyMMdd in scala dataframe
body: <p>I am very much new to scala and help regarding date format.
  I have a dataframe :</p>
  
  <pre><code>+-----+----------+----------+-----+                                             
  | name| startDate|   endDate|price|
  +-----+----------+----------+-----+
  |steak|01/01/1999|01/01/2000|  150|
  |steak|02/02/2000|13/01/2000|  180|
  | fish|03/03/2000|12/01/2000|  100|
  +-----+----------+----------+-----+
  </code></pre>
  
  <p>I need to convert the enddate column to yyyyMMdd format and need the result like below:</p>
  
  <pre><code>+-----+----------+----------+-----+                                             
  | name| startDate|   endDate|price|
  +-----+----------+----------+-----+
  |steak|01/01/1999|20000101  |  150|
  |steak|02/02/2000|20000113  |  180|
  | fish|03/03/2000|20000112  |  100|
  +-----+----------+----------+-----+
  </code></pre>
  
  <p>I have tried the below code and getting "NULL" in EndDate column</p>
  
  <pre><code>val result  = df.withColumn("EndDate",date_format(col("endDate"), "yyyyMMdd")).select("*").show()
  </code></pre>
  
  <p>Can anyone please help me?</p>