Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions python/pyspark/sql/functions/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13068,15 +13068,14 @@ def timestamp_diff(unit: str, start: "ColumnOrName", end: "ColumnOrName") -> Col
@_try_remote_functions
def timestamp_add(unit: str, quantity: "ColumnOrName", ts: "ColumnOrName") -> Column:
"""
Gets the difference between the timestamps in the specified units by truncating
the fraction part.
Adds the specified number of units to the given timestamp

.. versionadded:: 4.0.0

Parameters
----------
unit : literal string
This indicates the units of the difference between the given timestamps.
This indicates the units of datetime that you want to add.
Supported options are (case insensitive): "YEAR", "QUARTER", "MONTH", "WEEK",
"DAY", "HOUR", "MINUTE", "SECOND", "MILLISECOND" and "MICROSECOND".
quantity : :class:`~pyspark.sql.Column` or column name
Expand All @@ -13087,7 +13086,7 @@ def timestamp_add(unit: str, quantity: "ColumnOrName", ts: "ColumnOrName") -> Co
Returns
-------
:class:`~pyspark.sql.Column`
the difference between the timestamps.
the resulting timestamp after adding the specified number of units.

See Also
--------
Expand Down