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

Barry Becker commented on SPARK-16216:
--------------------------------------

Yes, That worked. Thanks for the workaround!
If I use 
.option("timestampFormat", "yyyy-MM-dd'T'HH:mm:ss")
instead of
.option("dateFormat", "yyyy-MM-dd'T'HH:mm:ss")
Then my test passes, and it has the behavior that I want.


> CSV data source does not write date and timestamp correctly
> -----------------------------------------------------------
>
>                 Key: SPARK-16216
>                 URL: https://issues.apache.org/jira/browse/SPARK-16216
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Hyukjin Kwon
>            Assignee: Hyukjin Kwon
>            Priority: Blocker
>              Labels: releasenotes
>             Fix For: 2.0.1, 2.1.0
>
>
> Currently, CSV data source write {{DateType}} and {{TimestampType}} as below:
> {code}
> +----------------+
> |            date|
> +----------------+
> |1440637200000000|
> |1414459800000000|
> |1454040000000000|
> +----------------+
> {code}
> It would be nicer if it write dates and timestamps as a formatted string just 
> like JSON data sources.
> Also, CSV data source currently supports {{dateFormat}} option to read dates 
> and timestamps in a custom format. It might be better if this option can be 
> applied in writing as well.



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