Simplest way to extract date from timestamp
There is also data.table
s as.IDate()
function now:
timestamp <- "2011-08-10 14:00:00"
data.table::as.IDate(timestamp)
This would probably be the simplest way:
date(timestamp)
It will return a date class and not a string.
Use date instead of day
lubridate::date(timestamp)