[ https://issues.apache.org/jira/browse/SPARK-30392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashley updated SPARK-30392: --------------------------- Attachment: Date_trunc.PNG > Documentation for the date_trunc function is incorrect > ------------------------------------------------------ > > Key: SPARK-30392 > URL: https://issues.apache.org/jira/browse/SPARK-30392 > Project: Spark > Issue Type: Documentation > Components: SQL > Affects Versions: 2.4.3 > Reporter: Ashley > Priority: Minor > Attachments: Date_trunc.PNG > > > The documentation for the date_trunc function includes a few sample SELECT > statements to show how the function works: > [https://spark.apache.org/docs/2.3.0/api/sql/#date_trunc] > In the sample SELECT statements, the inputs to the function are swapped: > *The docs show:* SELECT date_trunc('2015-03-05T09:32:05.359', 'YEAR'); > *The docs _should_ show:* SELECT date_trunc('YEAR', > '2015-03-05T09:32:05.359'); > !image-2019-12-30-15-00-36-359.png|width=709,height=462! -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org