人小时

问题描述

您好,我可以将时间列作为时间格式或date_time格式导入它返回NA,我该如何处理,first_form应该是时间格式,并且在预览中看起来像last_form(当前为字符) ? enter image description here

Inmigrations <- read_excel("Inmigrations.xlsx",col_types = c("skip","skip","text","date","numeric","date"))

解决方法

在将其导入为字符类型后尝试lubridate:

library(lubridate)

df$first_form <- hms(df$first_form)