-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
  • 77,147
  • 31
  • 174
  • 185
Bee
  • 105
  • 3
  • 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,036
  • 3
  • 21
  • 39