title: How to convert timestamp to AWS data lake s3 timestamp
body: <p>In my data frame I have timestamp column with values in format: &quot;%Y-%m-%d %H:%M:%m&quot;. I want to save this Data Frame to parquet using:
  <code> df.write.partitionBy('p_timestamp').mode(&quot;overwrite&quot;).parquet('output/proto.parquet')</code>
  and I want to have timestamp partition saved in AWS data lake s3 timestamp format: &quot;%Y-%m-%dT%H-%M&quot;</p>
  <p>I tried:</p>
  <pre><code>df.select(F.col(&quot;p_timestamp&quot;), F.date_format(F.col(&quot;p_timestamp&quot;), &quot;%Y-%m-%dT%H-%M&quot;).alias(&quot;date_format&quot;)).show()
  </code></pre>
  <p>but I got an error:
  <code>Illegal pattern character 'T'</code></p>
  <p>I would be grateful for any tips.</p>