In base R we can use strptime to parse and extract parts from a datetime by passing a restricted format.
> strptime("2012-05-25 18:45:32", format = "%Y-%m-%d")
[1] "2012-05-25 BST"
> strptime("2012-05-25 18:45:32", format = "%Y-%m-%d %H")
[1] "2012-05-25 18:00:00 BST
Reporter: Dragoș Moldovan-Grünfeld / @dragosmg
Watchers: Rok Mihevc / @rok
Related issues:
Note: This issue was originally created as ARROW-15813. Please see the migration documentation for further details.