You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Reynold Xin (JIRA)" <ji...@apache.org> on 2015/07/19 07:52:04 UTC

[jira] [Resolved] (SPARK-8199) date/time function: date_format

     [ https://issues.apache.org/jira/browse/SPARK-8199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Reynold Xin resolved SPARK-8199.
--------------------------------
       Resolution: Fixed
    Fix Version/s: 1.5.0

> date/time function: date_format
> -------------------------------
>
>                 Key: SPARK-8199
>                 URL: https://issues.apache.org/jira/browse/SPARK-8199
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Reynold Xin
>            Assignee: Tarek Auel
>             Fix For: 1.5.0
>
>
> date_format(date/timestamp/string ts, string fmt): string
> Converts a date/timestamp/string to a value of string in the format specified by the date format fmt (as of Hive 1.2.0). Supported formats are Java SimpleDateFormat formats – https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html. The second argument fmt should be constant. Example: date_format('2015-04-08', 'y') = '2015'.
> date_format can be used to implement other UDFs, e.g.:
> dayname(date) is date_format(date, 'EEEE')
> dayofyear(date) is date_format(date, 'D')



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org