title: How to concatenate a string and a column in a dataframe in spark?
body: <p>I have today's date as a string. I need to concatenate it with a time value that is present as a column in a dataframe. </p>
  
  <p>When I try this, I get <code>String Index out of bounds</code> exception.</p>
  
  <p>My code:</p>
  
  <pre><code>val todaydate = LocalDate.now().toString()
  println(todaydate)  // o/p: 2016-12-10
  
  val todayrec_cutoff = todaydate + (" ") + df.col("colname")
  </code></pre>
  
  <p>Expected Output:</p>
  
  <pre><code>2016-12-10 05:00 
  2016-12-10 22:30
  </code></pre>