spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Wang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-8174) date/time function: unix_timestamp
Date Tue, 09 Jun 2015 08:04:00 GMT

    [ https://issues.apache.org/jira/browse/SPARK-8174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14578513#comment-14578513
] 

Adrian Wang commented on SPARK-8174:
------------------------------------

I'll deal with this.

> date/time function: unix_timestamp
> ----------------------------------
>
>                 Key: SPARK-8174
>                 URL: https://issues.apache.org/jira/browse/SPARK-8174
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Reynold Xin
>
> 3 variants:
> {code}
> unix_timestamp(): long
> Gets current Unix timestamp in seconds.
> unix_timestamp(string|date): long
> Converts time string in format yyyy-MM-dd HH:mm:ss to Unix timestamp (in seconds), using
the default timezone and the default locale, return 0 if fail: unix_timestamp('2009-03-20
11:30:01') = 1237573801
> unix_timestamp(string date, string pattern): long
> Convert time string with given pattern (see [http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html])
to Unix time stamp (in seconds), return 0 if fail: unix_timestamp('2009-03-20', 'yyyy-MM-dd')
= 1237532400.
> {code}
> See: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF



--
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


Mime
View raw message