title: Saving a dataframe result value to a string variable?
body: <p>I created a dataframe in spark when find the max date I want to save it to the variable. Just trying to figure out how to get the result, which is a string, and save it to a variable.</p>
  
  <p>code so far:</p>
  
  <pre><code>sqlDF = spark.sql("SELECT MAX(date) FROM account")
  sqlDF.show()
  </code></pre>
  
  <p>what results look likes:</p>
  
  <pre><code>+--------------------+
  | max(date)|
  +--------------------+
  |2018-04-19T14:11:...|
  +--------------------+
  </code></pre>
  
  <p>thanks</p>