title: Pyspark Format Dates
body: <p>I have imported a CSV file by parsing it through pandas, then I converted the csv file to parquet format.</p>
  <p>The data read Time as <em>bigint</em> and date as <em>String</em></p>
  <p>I can change the date using the to_date function i.e. <code>df.withColumn('ObservationDate', to_date('ObservationDate'))</code>.</p>
  <p>However, I am struggling to change the Time column to HH format, and I also struggling to add the hours to the Date column. I have looked at the spark documents, but I am not able to find what I am looking for.</p>
  <p><a href="https://i.stack.imgur.com/CcvQQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CcvQQ.png" alt="enter image description here" /></a></p>