Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/20015#discussion_r157902098 --- Diff: python/pyspark/sql/functions.py --- @@ -1111,6 +1111,24 @@ def trunc(date, format): return Column(sc._jvm.functions.trunc(_to_java_column(date), format)) +@since(2.3) +def date_trunc(format, timestamp): + """ + Returns timestamp truncated to the unit specified by the format. + + :param format: 'year', 'YYYY', 'yy', 'month', 'mon', 'mm', --- End diff -- Nit: `YYYY` -> `yyyy`
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org