For example when your excel times read in as numeric values like 0.28125 which is actually 6:45
Had to do this for real data and this function worked for the small subset of values that had to be converted. None of the dttr2 excel convert functions worked for just doing the time.
excel_to_time <- function(x) {
chk::chk_numeric(x)
excel_time <- x * 24
hour <- floor(excel_time)
min <- excel_time %% 1
min <- min * 60
min <- round(min)
dtt_time_from_ints(hour, min, 0)
}
This would undo the TIMEVALUE function in excel.
For example when your excel times read in as numeric values like 0.28125 which is actually 6:45
Had to do this for real data and this function worked for the small subset of values that had to be converted. None of the
dttr2
excel convert functions worked for just doing the time.