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

Dongjoon Hyun commented on SPARK-16806:
---------------------------------------

Yep. Please use `yyyy` instead of `YYYY`.
{code}
sql("select from_unixtime(100), from_unixtime(100, 'yyyy-MM-dd HH:mm:ss')").show
{code}

> from_unixtime function gives wrong answer
> -----------------------------------------
>
>                 Key: SPARK-16806
>                 URL: https://issues.apache.org/jira/browse/SPARK-16806
>             Project: Spark
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Dong Jiang
>
> The following is from 2.0, for the same epoch, the function with format 
> argument generates a different result for the year.
> spark-sql> select from_unixtime(100), from_unixtime(100, 'YYYY-MM-dd 
> HH:mm:ss');
> 1969-12-31 19:01:40   1970-12-31 19:01:40



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

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

Reply via email to