title: Passing arguments to a Scala udf
body: <p>I am calling a udf on a specific column of my dataframe, in which I check if all values are valid as per a specified date format.</p>
  
  <pre><code>sourcefile = sourcefile.withColumn(column, DateConversion(col(column)))
  </code></pre>
  
  <p>Here DateConversion is my udf. My question here is that, is there a way  by which I can pass the valid date format "yyyy/MM/dd" as a string to this udf which can be used internally in the udf for validation purposes.</p>
  
  <p>I was trying </p>
  
  <pre><code>sourcefile = sourcefile.withColumn(column, DateConversion(col(column),"yyyy/MM/dd"))
  </code></pre>
  
  <p>But this gives and error.</p>