You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lubridate is an extremely good package for handling dates and date conversion. However, it does not accept perhaps one of the most common forms of date data: dates from Excel. Thankfully, many Excel-file-reading functions do this conversion for you, but when they don't it's always one more time Googling to figure out how to convert properly (or, worse, not realizing how oddly Excel handles dates and getting things 70 years off).
The actual task here is very easy, since it just requires setting origin = "1899-12-30". There are many ways this could be implemented, but one simple approach would be, since there is already lubridate::origin, to also have lubridate::excel_origin set to as.POSIXct('1899-12-30').
Maybe this is a bit left-field, but after Googling the correct date for the fiftieth time it occurs to me that this would be a useful convenience function.
The text was updated successfully, but these errors were encountered:
lubridate is an extremely good package for handling dates and date conversion. However, it does not accept perhaps one of the most common forms of date data: dates from Excel. Thankfully, many Excel-file-reading functions do this conversion for you, but when they don't it's always one more time Googling to figure out how to convert properly (or, worse, not realizing how oddly Excel handles dates and getting things 70 years off).
The actual task here is very easy, since it just requires setting
origin = "1899-12-30"
. There are many ways this could be implemented, but one simple approach would be, since there is alreadylubridate::origin
, to also havelubridate::excel_origin
set toas.POSIXct('1899-12-30')
.Maybe this is a bit left-field, but after Googling the correct date for the fiftieth time it occurs to me that this would be a useful convenience function.
The text was updated successfully, but these errors were encountered: