Category "datediff"

SQL How To Display Month Difference Between Return And Purchase Date

I need help with writing the query that will say month difference between return and purchase dates, see the example below. Product PurchaseDate (dd/mm/yy) Ret

pyspark: hours diff between two dates columns

I would like to calculate number of hours between two date columns in pyspark. Could only find how to calculate number of days between the dates. dfs_4.show()