Bui,
thanks, this what Avi suggested in an email to me as well and works.
It's so easy if you know it :-)-O
el
On 2022-07-13 23:40 , Rui Barradas wrote:
Hello,
Are you looking for mutate? In the example below I haven't included the
filter, since the tibble only has 2 rows. But the date column is coerced
to an actual datetime class in place, without the need for NewDate.
suppressPackageStartupMessages({
library(tibble)
library(dplyr)
})
DDATA <- tibble(Date = c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58'))
DDATA %>%
mutate(Date = lubridate::dmy_hm(Date))
#> # A tibble: 2 × 1
#> Date
#> <dttm>
#> 1 2022-07-09 11:39:00
#> 2 2022-07-10 01:58:00
Hope this helps,
Rui Barradas
[...]
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.