Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed date format in write_excel_csv #948

Closed
jschelbert opened this issue Dec 18, 2018 · 4 comments
Closed

Changed date format in write_excel_csv #948

jschelbert opened this issue Dec 18, 2018 · 4 comments

Comments

@jschelbert
Copy link

jschelbert commented Dec 18, 2018

With newer version of readr something has changed when writing data frames to CSV via the write_excel_csv function.
Old version (1.1.0) yields 2018-01-01T00:00:00Z in the newer versions (since 1.2.0) I get 2018/01/01 00:00:00.

See example code below:

library(readr)
library(dplyr)
library(lubridate)

df <- data_frame(a=ymd_h(2018010100, 2018120112), b = 1:2)
write_excel_csv(df, "temp.csv")
devtools::session_info()


#--------------------------------------------------------------------------------------------
devtools::dev_mode()
devtools::install_version("readr", version = "1.1.0", repos = "http://cran.us.r-project.org")
library(readr)
library(dplyr)
library(lubridate)

df <- data_frame(a=ymd_h(2018010100, 2018120112), b = 1:2)
write_excel_csv(df, "temp2.csv")
devtools::session_info()
@cderv
Copy link
Contributor

cderv commented Dec 19, 2018

This change happened in #761 to fix #553 .

write_excel_csv is intended to be used to create output that can be imported into excel, so this is on purpose. You still have the unchange date format in write_csv.

@jschelbert
Copy link
Author

Hi Christophe,
thank you for the clarification. I was a bit puzzled as this change wasn't mentioned in the change log (or have I missed it?).

@cderv
Copy link
Contributor

cderv commented Dec 19, 2018

you are right, it seems to be missing from the NEWS file... 🤔 Do not know if it can be added with such a delay.

@lock
Copy link

lock bot commented Jun 17, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jun 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants