We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
format
Possibly related to #1276.
# development version library(readr) packageVersion("readr") #> [1] '2.0.1.9000' fmt_space <- "%d/%m/%y %H:%M" fmt_nospace <- "%d/%m/%y%H:%M" # both work using parse_datetime() with_edition(1, readr::parse_datetime("1/9/19 0:00", fmt_space)) #> [1] "2019-09-01 UTC" with_edition(2, readr::parse_datetime("1/9/19 0:00", fmt_space)) #> [1] "2019-09-01 UTC" with_edition(1, readr::parse_datetime("1/9/19 0:00", fmt_nospace)) #> [1] "2019-09-01 UTC" with_edition(2, readr::parse_datetime("1/9/19 0:00", fmt_nospace)) #> [1] "2019-09-01 UTC" # create example data s <- c("datetime, value", "1/9/19 0:00, 1") f <- tempfile(fileext = "csv") writeLines(s, f) # both work with edition 1 with_edition(1, readr::read_csv( f, col_types = cols( col_datetime(fmt_space), col_integer() ) ) ) #> # A tibble: 1 x 2 #> datetime value #> <dttm> <int> #> 1 2019-09-01 00:00:00 1 with_edition(1, readr::read_csv( f, col_types = cols( col_datetime(fmt_nospace), col_integer() ) ) ) #> # A tibble: 1 x 2 #> datetime value #> <dttm> <int> #> 1 2019-09-01 00:00:00 1 # however, it fails in edition 2 if there is a space with_edition(2, readr::read_csv( f, col_types = cols( col_datetime(fmt_space), col_integer() ) ) ) #> Warning: One or more parsing issues, see `problems()` for details #> # A tibble: 1 x 2 #> datetime value #> <dttm> <int> #> 1 NA 1 # without spacing, it works with_edition(2, readr::read_csv( f, col_types = cols( col_datetime(fmt_nospace), col_integer() ) ) ) #> # A tibble: 1 x 2 #> datetime value #> <dttm> <int> #> 1 2019-09-01 00:00:00 1
Created on 2021-09-06 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered:
This should be fixed by installing the latest version of vroom (1.5.5)
Sorry, something went wrong.
Thanks! Just checked and the problem goes away after updating vroom to v1.5.5.
No branches or pull requests
Possibly related to #1276.
Created on 2021-09-06 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered: