Skip to content

Commit 9d1eec0

Browse files
committed
docs: update syntax for date_part and extract functions in user guide
- Changed f.date_part(literal("month"), ...) to f.date_part("month", ...) - Changed f.extract(literal("day"), ...) to f.extract("day", ...)
1 parent 1e00278 commit 9d1eec0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/source/user-guide/common-operations/functions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ Extracting parts of a date using :py:func:`~datafusion.functions.date_part` (ali
7777
.. ipython:: python
7878
7979
df.select(
80-
f.date_part(literal("month"), f.to_timestamp(col('"Total"'))).alias("month"),
81-
f.extract(literal("day"), f.to_timestamp(col('"Total"'))).alias("day")
80+
f.date_part("month", f.to_timestamp(col('"Total"'))).alias("month"),
81+
f.extract("day", f.to_timestamp(col('"Total"'))).alias("day")
8282
)
8383
8484
String

0 commit comments

Comments
 (0)