Assume I have created a variable containing date and time:
a <- ymd_hms(\"2014-01-01 12:23:34\")
How do I create another variable that o
Using date() is much shorter and avoids any issues with rounding.
date()
library(lubridate) date(a) [1] "2014-01-01"