@@ -975,7 +975,7 @@ def date_format(date, format):
975975 A pattern could be for instance `dd.MM.yyyy` and could return a string like '18.03.1993'. All
976976 pattern letters of `datetime pattern`_. can be used.
977977
978- .. _datetime pattern: https://spark.apache.org /docs/latest/sql-ref-datetime-pattern.html
978+ .. _datetime pattern: /docs/latest/sql-ref-datetime-pattern.html
979979 .. note:: Use when ever possible specialized functions like `year`. These benefit from a
980980 specialized implementation.
981981
@@ -1196,8 +1196,6 @@ def to_date(col, format=None):
11961196 By default, it follows casting rules to :class:`pyspark.sql.types.DateType` if the format
11971197 is omitted. Equivalent to ``col.cast("date")``.
11981198
1199- .. _datetime pattern: https://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html
1200-
12011199 >>> df = spark.createDataFrame([('1997-02-28 10:30:00',)], ['t'])
12021200 >>> df.select(to_date(df.t).alias('date')).collect()
12031201 [Row(date=datetime.date(1997, 2, 28))]
@@ -1221,8 +1219,6 @@ def to_timestamp(col, format=None):
12211219 By default, it follows casting rules to :class:`pyspark.sql.types.TimestampType` if the format
12221220 is omitted. Equivalent to ``col.cast("timestamp")``.
12231221
1224- .. _datetime pattern: https://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html
1225-
12261222 >>> df = spark.createDataFrame([('1997-02-28 10:30:00',)], ['t'])
12271223 >>> df.select(to_timestamp(df.t).alias('dt')).collect()
12281224 [Row(dt=datetime.datetime(1997, 2, 28, 10, 30))]
0 commit comments