powered by
This function converts 12-hour clock values to 24-hour clock values.
get_24_hour_clock(x = NA)
A character vector representing values in 12-hour clock format.
Returns a 24-hour clock vector (if valid) or NA (if not valid).
Other capl functions called by this function include: validate_character() and validate_integer().
capl
validate_character()
validate_integer()
# NOT RUN { get_24_hour_clock(c("5:00 am", "7:10PM", "9:37", NA, "21:13", "", 9, "6:17")) # [1] "05:00" "19:10" "09:37" NA "21:13" NA NA "06:17" # }
Run the code above in your browser using DataLab