`anytime` was written for this:
> anytime::anytime("2020-09-17_00:00:00")
[1] "2020-09-17 CDT"
> class(anytime::anytime("2020-09-17_00:00:00"))
[1] "POSIXct" "POSIXt"
>
Dirk
--
dirk.eddelbuettel.com | @eddelbuettel | [email protected]
______________________________________________
[email protected] 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.