Creates two columns. One contains month, day, and year and the other contains hour, and minute.
cs_parse_date(.data, var, dateVar, timeVar, tz = NULL, keepDateTime = TRUE)
.data | A tibble or data frame |
---|---|
var | A column containing month, day, year, and time separated by |
dateVar | Name of new column to contain date data |
timeVar | Name of new column to contain time data |
tz | String name of timezone, defaults to system's timezone |
keepDateTime | A logical scalar. Keep an intermediate dateTime variable if |
A copy of the object with two columns appended. One is the time data and the other is the date data.
# load example data testData <- january2018 # parse date occured testData <- cs_parse_date(testData, var = date_occur, dateVar = dateOcc, timeVar = timeOcc)