Hi to everyone,
I read an excel file
> library(openxlsx)
bd <- read.xlsx("BASDAT.xlsm")
And I get number dates

This date represent 01/07/2017. July 01, 2017.
Is there a way to convert this to date format? I know excel dates starts at 01/01/1900 So I tryed:
> library(lubridate)
> dates <-42917:42918
> as.Date('1900-01-01') + days(dates)
[1] "2017-07-03" "2017-07-04"
But, 42917 represents July 03, 2017 instead of Excel's July 01, 2017. Do you have any idea to solve this problem? I could try with
> library(lubridate)
dates <-42917:42918
as.Date('1899-12-30') + days(dates)
[1] "2017-07-01" "2017-07-02"
Really I don't think doing this It's the best way to do this. So If you have any solution I would be very grateful.