I am trying to get the date part of a date-time POSIXt object in R I get a number instead.
Here is my data:
y <- "2017-01-03 19:59:00"
Using following code:
as.Date(as.POSIXct(y))
I get this number: 17169
. I am in Eastern Time Zone (UTC-05:00) and have checked to make sure y
is a POSIXt
class. I am out of options and any help is appreciated.