You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ymd_hms function will left-pad date strings that are missing "seconds" values with "20". This only happens for some dates--can't seem to find a pattern.
library(lubridate)
# Generates NA, as expected
ymd_hms("2020-12-22 33:33")
#> Warning: All formats failed to parse. No formats found.#> [1] NA# Generates incorrect dates by left padding with "20"
ymd_hms("1901-12-22 12:33")
#> [1] "2019-01-12 22:12:33 UTC"
ymd_hms("2002-12-22 33:33")
#> [1] "2020-02-12 22:33:33 UTC"
ymd_hms("1801-12-22 12:33")
#> [1] "2018-01-12 22:12:33 UTC"
The text was updated successfully, but these errors were encountered:
mgimond
changed the title
ymd_hms() function left pads some dates that have missing "seconds" values
ymd_hms() function left-pads some dates that have missing "seconds" values
Jan 6, 2024
The
ymd_hms
function will left-pad date strings that are missing "seconds" values with"20"
. This only happens for some dates--can't seem to find a pattern.Created on 2024-01-05 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: