Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/17901#discussion_r115398027
--- Diff: python/pyspark/sql/functions.py ---
@@ -987,9 +981,10 @@ def months_between(date1, date2):
def to_date(col, format=None):
"""Converts a :class:`Column` of :class:`pyspark.sql.types.StringType`
or
:class:`pyspark.sql.types.TimestampType` into
:class:`pyspark.sql.types.DateType`
- using the optionally specified format. Default format is 'yyyy-MM-dd'.
- Specify formats according to
+ using the optionally specified format. Specify formats according to
`SimpleDateFormats
<http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html>`_.
+ By default, it follows casting rules to
:class:`pyspark.sql.types.DateType` if the format
--- End diff --
ditto, not sure if it's clear to python user with `casting rules to
:class:pyspark.sql.types.DateType`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]