-2

I am reading a very high volume sas7bdat file in R and converting it into a dataframe. However, one of the fields is a SAS Epoch date. Any idea how I can convert this to a datetime field?

I know in SQL Server, we can convert using: DATEADD(ss, myDate, '19600101')

Any way we can do the same in R?

Jaap
  • 81,064
  • 34
  • 182
  • 193
Bee
  • 125
  • 4
  • 12

1 Answers1

-1

Following Zheyuan Li's comment,

as.Date(myDate, origin = "1960-01-01")

should do the trick.

Community
  • 1
  • 1
Jake Fisher
  • 3,220
  • 3
  • 26
  • 39