Dates from Excel to R, platform dependency
I'm importing xls files using gdata . I am converting date columns using as.Date to convert the date As per the manual for as.Date , the date origin is platform dependent, and so I am determining which origin to use accordingly .origin <- ifelse(Sys.info()[['sysname']] == "Windows", "1899-12-30", "1904-01-01") as.Date(myData$Date, origin=.origin) However, I'm wondering if I should be considering the platform where the file is being read or the platform where it was written ? For what it's worth, I am currently testing the code on a linux box with no excel, and the correct Dates are produced by