title: Spark getting current date in string
body: <p>I have the code below to get the date in the proper format to then be able to append to a filename string.</p>
  <pre><code>%scala
  
  // Getting the date for the file name
  import org.apache.spark.sql.functions.{current_timestamp, date_format}
  val dateFormat = &quot;yyyyMMdd_HHmm&quot;
  val dateValue = spark.range(1).select(date_format(current_timestamp,dateFormat)).collectAsList().get(0).get(0)
  
  val fileName = &quot;TestFile_&quot; + dateValue+ &quot;.csv&quot;
  </code></pre>
  <p>I feel this is faily heavy handed, is there an easier way to simply get the current date to a string?</p>