title: How do I convert timestamp to unix format with pyspark
body: <p>I have a dataframe with timestamp values, like this one: 2018-02-15T11:39:13.000Z
  I want to have it in UNIX format, using Pyspark.</p>
  
  <p>I tried something like <code>data = datasample.withColumn('timestamp_cast', datasample['timestamp'].cast('date'))</code> but I lose a lot of information, since I only get day/month/year when I have milliseconds information in my source.</p>
  
  <p>Result: <code>2018-02-15</code></p>
  
  <p>Any idea to get unix format and keep precision? Thank you!</p>