It\'s quite weird to ask this question that I apply a sas7 dataset into R. One of my variable is visit_date
now it looks like this, i am wondering where i can transf
Those "dates" are clearly using a different origin/offset than the typical POSIX standard that would work with this conversion. R generally uses YYYY-MM-DD format
as.Date(ffffd, origin="1970-01-01")
> head( as.Date(ffffd, origin="1970-01-01") )
[1] "2016-10-03" "2016-10-17" "2016-10-31" "2016-11-14" "2016-11-28" "2016-09-25"
So you need to establish the correct origin. If it was 1960-01-01, then none of those dates is greater than 08-01-2010.
> sum( as.Date(ffffd, origin="1960-01-01") >= as.Date("2010-08-01") )
[1] 0
> sum( as.Date(ffffd, origin="1960-01-01") < as.Date("2010-08-01") )
[1] 336